The rwrfhydro package is intended as a multi-purpose tool for computing activities related to the WRF Hydro model. But how do you know which tool to use or even if the right tool might exist? If you are developing a new set of tools, how do you help users discover your tools?
To aid in discover of appropriate tools, the functions are organized or tagged in two ways. First, using the existing set of R “keywords” (see the end of this document for that list). Second, tools are tagged with customized “concepts” which are defined specifically for rwrfhydro. We illustrate how to reveal these categories and the functions within them for rwrfhydro (or any other package). For developers, we show how to document keywords and concepts and how to cross-reference within the documentation.
(Note that these commands will not work for packages loaded by devtools::load_all
, you have to load an built/installed version of rwrfhydro.)
Load the rwrfhydro package.
library("rwrfhydro")
help
and help.search
There are several basic commands which can give insight into a package and its contents
?rwrfhydro
rwrfhydro | R Documentation |
A community-contributed tool box for managing, analyzing, and visualizing WRF Hydro (and HydroDART) input and output files in R.
Please visit the welcome documentation/README page at:
https://github.com/mccreigh/rwrfhydro
Top level help: help(package=‘rwrfhydro’)
Package overview vignette (long-form example) online:
http://htmlpreview.github.io/?https://github.com/mccreigh/rwrfhydro/blob/master/vignettes/overview.Rmd
All package vignettes (long-form examples) online:
https://github.com/mccreigh/rwrfhydro/blob/master/vignettes.Rmd
Discover rwrfhydro orgainzation into “concepts” and “keywords”: GetPkgMeta
Or
help(package='rwrfhydro')
## Information on package 'rwrfhydro'
##
## Description:
##
## Package: rwrfhydro
## Type: Package
## Title: R tools for the WRF Hydro Model
## Version: 1.0.9000
## Date: 2015-05-01
## Authors@R: c( person("James", "McCreight", email = "jamesmcc@ucar.edu", role =
## c("aut","cre")), person("Aubrey", "Dugger", email = "", role = "aut"),
## person("Arezoo", "RafieeiNasab", email = "", role = "aut"),
## person("Logan", "Karsten", email = "", role = "aut"), person("Alyssa",
## "Hendricks", email = "", role = "aut") )
## Maintainer: James McCreight <jamesmcc@ucar.edu>
## Description: A community-contributed tool box for managing, analyzing, and
## visualizing WRF Hydro (and HydroDART) input and output files in R.
## License: https://github.com/mccreigh/rwrfhydro/blob/master/LICENSE.md
## Depends: R (>= 3.1.0)
## Imports: data.table (>= 1.9.6), plyr (>= 1.8.1), grid (>= 3.1.2), lubridate (>=
## 1.3.3), ncdf4 (>= 1.13), ggplot2 (>= 1.0.0), ggmap (>= 2.3), reshape2
## (>= 1.4.1), foreach (>= 1.4.2), curl (>= 0.5), RCurl (>= 1.95),
## dataRetrieval (>= 2.1.2), raster (>= 2.3), httr (>= 0.6.1), devtools
## (>= 1.7.0), jsonlite (>= 0.9.14)
## LazyData: true
## Suggests: testthat, knitr, rgdal, sp, pander, doMC, ptw, rmarkdown
## BuildVignettes: false
## VignetteBuilder: knitr
## RoxygenNote: 5.0.1
## Author: James McCreight [aut, cre], Aubrey Dugger [aut], Arezoo RafieeiNasab
## [aut], Logan Karsten [aut], Alyssa Hendricks [aut]
## Built: R 3.3.2; ; 2016-12-13 00:06:50 UTC; unix
## RemoteType: github
## RemoteHost: https://api.github.com
## RemoteRepo: rwrfhydro
## RemoteUsername: mccreigh
## RemoteRef: devBranch
## RemoteSha: b0c84177cfd0b5bae47541baaf38278976c43e57
## GithubRepo: rwrfhydro
## GithubUsername: mccreigh
## GithubRef: devBranch
## GithubSHA1: b0c84177cfd0b5bae47541baaf38278976c43e57
##
## Index:
##
## AddRouteLinkGage Add a 'gages' column to a RouteLink.nc file
## CalcDailyGhcn Aggregate hourly precipitation data into daily
## values to be comparable to GHCN daily data.
## CalcFdc Calculate flow duration curve statistics
## CalcFdcPerf Computes flow duration curve statistics for
## WRF-Hydro streamflow output
## CalcFdcSpline Generate a spline-fit funtion for a flow
## duration curve
## CalcModPerf Computes model performance statistics for
## WRF-Hydro flux output
## CalcModPerfMulti Computes model performance statistics for
## WRF-Hydro flux output
## CalcNoahmpFluxes Calculate water fluxes from NoahMP output
## CalcNoahmpWatBudg Calculate water balance from WRF-Hydro
## (w/NoahMP) output
## CalcSnodasCoords Calculate the SNODAS coordinates.
## CalcStatCategorical Calculate some categorical verification
## measures for categorical/continuous variables.
## CalcStatCont Calculate some verification measures for
## continuous variables.
## CalcStatsRS Calculates summary statistics from a remote
## sensing time series
## ChanObsToTimeSlice Process model CHANOBS to observation timeSlice
## format for nudging DA.
## CheckConn CheckConn checks a re-expressed network.
## ConvertRS2Stack Convert a set of MODIS images to a raster stack
## and, optionally, a NetCDF file.
## ConvertStack2NC Convert a raster stack to a NetCDF file.
## CreateBasinMask Create a coarse-resolution basin mask grid.
## EditFrxstPts Edit the a frxst pts layer in Fulldom
## ExportGeogrid Creates a georeferenced TIF from a geogrid
## variable
## FindUsgsStns Discover USGS stations using huc8 code or
## lat/lon/radius.
## GapFillRS Gap fill a series of MODIS images using
## interpolation.
## GatherStreamInds Gather upstream or downstream distance from a
## given starting location.
## GetAmeriflux Get Ameriflux data for specified sites.
## GetCoDwrData Get CO DWR data for specified sites.
## GetDomainCoordsProj 'GetDomainCoordsProj' collects and reprojects
## spatial data from geo and hydro files.
## GetGeogridIndex Get geogrid cell indices from lat/lon (or
## other) coordinates.
## GetGeogridSpatialInfo Pull necessary geospatial information from
## geogrid file used for regridding and
## deprojection.
## GetGhcn Get GHCN-D data for specified siteIds.
## GetGhcn2 Get GHCN-D data for specified siteIds.
## GetMODIS Get MODIS data and process to match geogrid
## GetMultiNcdf Get WRF Hydro output/restart (scalar)
## timeseries spread over multiple files.
## GetNWCSnowPoints Get and unpack National Water Center SWE and
## snow depth point observations for a given hour.
## GetNcdfFile Get variables from a ncdf file
## GetPkgMeta Get a package's metadata fields and associated
## entries.
## GetPoly Return the polygon attribute for any point.
## GetProj Pull projection information from geogrid file
## 'GetProj' Pull projection information of
## WRF-Hydro modeling domain from geogrid file.
## GetRfc Return the RFC name for any point.
## GetSiteHuc Given a USGS site code, return its HUC8.
## GetSnodasDepthSweDate Get and unpack the SNODAS snow depth and SWE
## tarball for given dates.
## GetSnodasPointTs Pull SNODAS snowdepth and SWE time series for a
## given lat/lon pair.
## GetSnotel Get SNOTEL data for specified sites.
## GetStage4Files Download Stage IV and II data files
## GetTimeZone Return the time zone for any point.
## GetUsgsHucData Get all the USGS streamgage information within
## a HUC8.
## InsertRS Inserts pre-processed images into appropriate
## forcing NetCDF files by date.
## MkDischargeVariance Make variances for prettyUsgs discharge
## observations.
## MkNcdf List based creation of netcdf files.
## MkNudgingParams Create a parameter file for nudging.
## MkUsgsTimeSlice Make timeslices from active USGS discharge data
## files.
## Model3SdErrClimTaper Three-sigma error specification assuming errors
## are smaller near climatological median (or
## other quantile).
## Model3SdErrPctErrPlusQntlIncpt
## Three-sigma errors specified as percent of
## observed plus some quantile of historical
## flows.
## NamedList Create and or name a list with its entries.
## NtwKReExToNcdf Output the network reexpression to netcdf.
## PlotFdc Plot a flow duration curve for a single
## streamflow time series
## PlotFdcCompare Plots a flow duration curve for up to three
## streamflow time series (e.g., observed & two
## model outputs)
## PlotFluxCompare Plot time series comparing modeled and observed
## fluxes
## PlotPrettyUsgs Plot USGS site data which has been prettied
## with PrettyUsgs.
## PlotWatBudg Plot water balance from WRF-Hydro (w/NoahMP)
## output
## PolyToRaster Creates raster file from polygon matching the
## 'geoFile'
## PrettyUsgs PrettyUsgs constructs the S3 class prettyUsgs.
## PutSnodasCoordsNcdf Put the SNODAS coordinates into a netcdf file.
## PutSnodasNcdf Write output of ReadSnodasDepthSweDate to
## netcdf.
## QueryHaveSite General purpose query/get for instantaneous
## USGS streamflow data.
## QuerySiteData Returns the data for given sites from local
## database.
## QuerySiteInfo Returns the desired information from the
## database metadata file.
## QuerySiteName Find the name (site id) for a given site (name)
## in the local database.
## QuerySiteProd Find the products available for a given site in
## the local database.
## ReExpNetwork ReExpress stream networks indexed network
## traversal.
## ReExpressRouteLink ReExpress the Route_Link.nc file.
## ReIndexRouteLink ReIndex RouteLink.nc (netcdf) files for indexed
## network traversal.
## ReadAmerifluxCSV Read standard-format CSV data downloaded from
## Ameriflux
## ReadAmerifluxNC Read standard-format NetCDF data downloaded
## from Ameriflux
## ReadChrtout Read WRF-Hydro CHRTOUT data files.
## ReadCoDwrGage Read standard-format text data table downloaded
## from CO DWR
## ReadFrxstPts Read WRF-Hydro standard-format forecast points
## output text file.
## ReadGwOut Read WRF-Hydro standard-format groundwater
## output text file.
## ReadLdasoutAll Read WRF-Hydro (w/NoahMP) LDASOUT data files
## and generate basin-wide mean of all variables.
## ReadLdasoutWb Read WRF-Hydro (w/NoahMP) LDASOUT data files
## and generate basin-wide mean water budget
## variables.
## ReadRouteLink Read in WRF-Hydro route link file
## ReadRtout Read WRF-Hydro RTOUT data files and generate
## basin-wide mean water fluxes.
## ReadSnodasDepthSweDate
## Read snodas snow depth and SWE into memory for
## a given date.
## ReadUsgsGage Read standard-format text data table downloaded
## from USGS Water Data
## SaveHucData Save the output of GetUsgsHucData to an
## archive.
## SelectGhcnGauges Read the daily GHCN-D metadata and select
## gauges based on the user criteria.
## SmoothStack Run MODIS-R Whittaker smoothing over
## pre-processed raster stack.
## VisualizeChanNtwk Visualize WRF Hydro channel link indices and
## get coordinates.
## VisualizeDomain Visualize WRF Hydro domain files.
## VisualizeRouteLink Visualize RouteLink.nc files.
## VisualizeSpatial Visualize WRF Hydro domain spatial data.
## VisualizeSubsetStream Visualize upstream or downstream links
## determined from GatherStreamInds
## WriteDischargeObsSeq Writes an ascii obs_seq.in file for DART binary
## create_obs_sequence
## amfMeta Ameriflux site metadata
## gages2Attr Gages-II attributes
## gages2AttrPlus Gages-II attributes
## multiplot Plot multiple ggplot objects
## ncdump Emulate ncdump -h and -v.
## rfc Polygon shapefile of River Forecast Center
## boundaries.
## rwrfhydro rwrfhydro: Tools for working with WRF Hydro
## data.
## snotelMeta SNOTEL site metadata
## timeZone Time zone polygon
## tzLookup Time zone lookup table
To simply print the available (exported) functions:
ls('package:rwrfhydro')
## [1] "AddRouteLinkGage" "AllSame"
## [3] "amfMeta" "AsCharLongInt"
## [5] "CalcCOM" "CalcDailyGhcn"
## [7] "CalcDates" "CalcDateTrunc"
## [9] "CalcFdc" "CalcFdcPerf"
## [11] "CalcFdcSpline" "CalcMeanMinrm"
## [13] "CalcMeanNarm" "CalcModPerf"
## [15] "CalcModPerfMulti" "CalcMonthDays"
## [17] "CalcNoahmpFluxes" "CalcNoahmpWatBudg"
## [19] "CalcRunningMean" "CalcSnodasCoords"
## [21] "CalcStatCategorical" "CalcStatCont"
## [23] "CalcStatsRS" "CalcWaterYear"
## [25] "ChanObsToTimeSlice" "CheckForUpdates"
## [27] "CheckMasterSha" "CommitGithub"
## [29] "ConvertRS2Stack" "ConvertStack2NC"
## [31] "CreateBasinMask" "CumsumNa"
## [33] "EditFrxstPts" "ExportGeogrid"
## [35] "FillOutliers" "FindUsgsStns"
## [37] "FlipLR" "FlipUD"
## [39] "FormalsToDf" "gages2Attr"
## [41] "gages2AttrPlus" "GapFillRS"
## [43] "GatherStreamInds" "GetActiveHucData"
## [45] "GetAmeriflux" "GetCoDwrData"
## [47] "GetDomainCoordsProj" "GetFileStat"
## [49] "GetGages2NwisMeta" "GetGeogridIndex"
## [51] "GetGeogridSpatialInfo" "GetGhcn"
## [53] "GetGhcn2" "GetMODIS"
## [55] "GetMultiNcdf" "GetMultiNcdfFile"
## [57] "GetMultiNcdfVariable" "GetNcdfFile"
## [59] "GetNWCSnowPoints" "GetPkgMeta"
## [61] "GetPkgRawDataPath" "GetPoly"
## [63] "GetProj" "GetRemoteMetadata"
## [65] "GetRfc" "GetSiteHuc"
## [67] "GetSnodasDepthSweDate" "GetSnodasPointTs"
## [69] "GetSnotel" "GetStage4Files"
## [71] "GetTimeZone" "GetUsgsHucData"
## [73] "GetUsgsIvProduct" "github_GET"
## [75] "ImproveHucMeta" "InsertRS"
## [77] "LoadMetaDB" "LsObjects"
## [79] "lsOS" "MkDischargeVariance"
## [81] "MkNcdf" "MkNudgingParams"
## [83] "MkUsgsTimeSlice" "Model3SdErrClimTaper"
## [85] "Model3SdErrPctErrPlusQntlIncpt" "multiplot"
## [87] "NamedList" "ncdump"
## [89] "Nse" "NseLog"
## [91] "NtwKReExToNcdf" "PadRange"
## [93] "PlotCollectStats" "PlotFdc"
## [95] "PlotFdcCompare" "PlotFluxCompare"
## [97] "PlotLatency" "PlotNStnSlice"
## [99] "PlotPrettyUsgs" "PlotWatBudg"
## [101] "PolyToRaster" "PosixOrigin"
## [103] "PrettyUsgs" "PutSnodasCoordsNcdf"
## [105] "PutSnodasNcdf" "QueryHaveSite"
## [107] "QuerySiteData" "QuerySiteInfo"
## [109] "QuerySiteName" "QuerySiteProd"
## [111] "RBFlash" "ReadAmerifluxCSV"
## [113] "ReadAmerifluxNC" "ReadChrtout"
## [115] "ReadCoDwrGage" "ReadFrxstPts"
## [117] "ReadGwOut" "ReadLdasoutAll"
## [119] "ReadLdasoutWb" "ReadNcTimeSlice"
## [121] "ReadRouteLink" "ReadRtout"
## [123] "ReadSnodasDepthSweDate" "ReadUsgsGage"
## [125] "ReExpNetwork" "ReExpressRouteLink"
## [127] "ReIndexRouteLink" "ReshapeMultiNcdf"
## [129] "rfc" "Rmse"
## [131] "RmseNorm" "RotateCcw"
## [133] "RotateCw" "RoundMinutes"
## [135] "SaveHucData" "SelectGhcnGauges"
## [137] "SmoothStack" "snotelMeta"
## [139] "StdLon" "timeZone"
## [141] "TransTz" "tzLookup"
## [143] "VisualizeChanNtwk" "VisualizeDomain"
## [145] "VisualizeRouteLink" "VisualizeSpatial"
## [147] "VisualizeSubsetStream" "WriteDischargeObsSeq"
## [149] "WriteNcTimeSlice"
However, none of the above (except perhaps the first) really help make sense of the (already) sprawling set of functions available in rwrfhydro. The R help.search()
matches a pattern against fields = c("alias", "concept", "title")
by default, so it can help when you know the concept your are looking for. It also provides a keyword
field, so you can find keywords of interest (keywords are defined a priori unlike concepts, so you might actually know them).
help.search("DART",package='rwrfhydro')
Package | Topic | Title |
---|---|---|
rwrfhydro | MkDischargeVariance | Make variances for prettyUsgs discharge observations. |
rwrfhydro | VisualizeChanNtwk | Visualize WRF Hydro channel link indices and get coordinates. |
rwrfhydro | WriteDischargeObsSeq | Writes an ascii obs_seq.in file for DART binary create_obs_sequence |
Or
help.search(package='rwrfhydro', keyword='hplot')
Package | Topic | Title |
---|---|---|
rwrfhydro | GetDomainCoordsProj | ‘GetDomainCoordsProj’ collects and reprojects spatial data from geo and hydro files. |
rwrfhydro | PlotFdc | Plot a flow duration curve for a single streamflow time series |
rwrfhydro | PlotFdcCompare | Plots a flow duration curve for up to three streamflow time series (e.g., observed & two model outputs) |
rwrfhydro | PlotPrettyUsgs | Plot USGS site data which has been prettied with PrettyUsgs. |
rwrfhydro | VisualizeChanNtwk | Visualize WRF Hydro channel link indices and get coordinates. |
rwrfhydro | VisualizeDomain | Visualize WRF Hydro domain files. |
rwrfhydro | VisualizeRouteLink | Visualize RouteLink.nc files. |
rwrfhydro | VisualizeSpatial | Visualize WRF Hydro domain spatial data. |
rwrfhydro | VisualizeSubsetStream | Visualize upstream or downstream links determined from GatherStreamInds |
But there’s no clear way in R to discover keywords or concepts used within a package (that I’ve ever found.)
GetPkgMeta
So, rwrfhydro includes GetPkgMeta
: the slicer and dicer of package discovery that reveals both concepts and keywords, each in alphabetical order and shows the functions associated with each. With the following argument, only the concepts and keywords are returned.
GetPkgMeta(listMetaOnly = TRUE)
##
## -----------------------------------
## rwrfhydro concepts
## -----------------------------------
## Ameriflux
## DART
## data
## dataAnalysis
## dataGet
## dataMgmt
## geospatial
## getData
## GHCN
## modelEval
## MODIS
## ncdf
## nudging
## plot
## ploting
## SNODAS
## SNOTEL
## Streamflow
## usgs
## usgsStreamObs
##
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## data
## database
## hplot
## internal
## IO
## manip
## plot
## smooth
## ts
## univar
## utilities
By defulat (without any arguments at all), you also get the functions in each concept and keyword
pkgMeta <- GetPkgMeta()
##
## -----------------------------------
## rwrfhydro concepts
## -----------------------------------
## * Ameriflux:
## GetAmeriflux
##
## * DART:
## MkDischargeVariance VisualizeChanNtwk WriteDischargeObsSeq
##
## * data:
## amfMeta gages2Attr gages2AttrPlus rfc snotelMeta timeZone tzLookup
##
## * dataAnalysis:
## CalcStatsRS SmoothStack
##
## * dataGet:
## CreateBasinMask FindUsgsStns GetFileStat GetGeogridIndex GetMODIS GetMultiNcdfFile
## GetMultiNcdfVariable GetNWCSnowPoints GetSiteHuc GetStage4Files GetUsgsHucData
## GetUsgsIvProduct ImproveHucMeta ReadAmerifluxCSV ReadAmerifluxNC ReadChrtout
## ReadCoDwrGage ReadFrxstPts ReadGwOut ReadLdasoutAll ReadLdasoutWb ReadRouteLink
## ReadRtout ReadUsgsGage SaveHucData
##
## * dataMgmt:
## AddRouteLinkGage CalcNoahmpFluxes CheckConn ConvertRS2Stack ConvertStack2NC
## EditFrxstPts ExportGeogrid GapFillRS GatherStreamInds GetPoly GetRfc GetTimeZone
## InsertRS LoadMetaDB MkDischargeVariance MkNudgingParams NtwKReExToNcdf PolyToRaster
## PrettyUsgs QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName QuerySiteProd
## ReExpNetwork ReExpressRouteLink ReIndexRouteLink TransUsgsProdStat VisualizeRouteLink
## WriteDischargeObsSeq sub-.prettyUsgs subset.prettyUsgs
##
## * geospatial:
## ExportGeogrid GetGeogridIndex GetGeogridSpatialInfo GetProj PolyToRaster
##
## * getData:
## GetGeogridSpatialInfo GetProj
##
## * GHCN:
## CalcDailyGhcn GetGhcn GetGhcn2 SelectGhcnGauges
##
## * modelEval:
## CalcFdc CalcFdcPerf CalcFdcSpline CalcModPerf CalcModPerfMulti CalcNoahmpWatBudg
## CalcStatCategorical CalcStatCont PlotFdc PlotFdcCompare
##
## * MODIS:
## CalcStatsRS ConvertRS2Stack ConvertStack2NC GapFillRS GetMODIS InsertRS SmoothStack
##
## * ncdf:
## GetNcdfFile MkNcdf ncdump
##
## * nudging:
## AddRouteLinkGage ChanObsToTimeSlice CheckConn EditFrxstPts GatherStreamInds
## MkNudgingParams NtwKReExToNcdf ReExpNetwork ReExpressRouteLink VisualizeSubsetStream
##
## * plot:
## GetDomainCoordsProj PlotFdc PlotFdcCompare PlotPrettyUsgs VisualizeChanNtwk
## VisualizeDomain VisualizeRouteLink VisualizeSpatial VisualizeSubsetStream
##
## * ploting:
## multiplot
##
## * SNODAS:
## CalcSnodasCoords GetSnodasDepthSweDate GetSnodasPointTs PutSnodasCoordsNcdf
## PutSnodasNcdf ReadSnodasDepthSweDate
##
## * SNOTEL:
## GetSnotel
##
## * Streamflow:
## GetCoDwrData
##
## * usgs:
## MkUsgsTimeSlice
##
## * usgsStreamObs:
## FindUsgsStns GetSiteHuc GetUsgsHucData GetUsgsIvProduct ImproveHucMeta LoadMetaDB
## PlotPrettyUsgs PrettyUsgs QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName
## QuerySiteProd SaveHucData TransUsgsProdStat sub-.prettyUsgs subset.prettyUsgs
##
##
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## * data:
## amfMeta gages2Attr gages2AttrPlus rfc snotelMeta timeZone tzLookup
##
## * database:
## LoadMetaDB QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName QuerySiteProd
## SaveHucData TransUsgsProdStat
##
## * hplot:
## GetDomainCoordsProj PlotFdc PlotFdcCompare PlotPrettyUsgs VisualizeChanNtwk
## VisualizeDomain VisualizeRouteLink VisualizeSpatial VisualizeSubsetStream
##
## * internal:
## AllSame AsCharLongInt CalcCOM CalcDateTrunc CalcDates CalcMeanMinrm CalcMeanNarm
## CalcMonthDays CalcRunningMean CalcWaterYear CumsumNa FillOutliers FlipLR FlipUD
## FormalsToDf GetFileStat GetGithubPat GetMultiNcdfFile GetMultiNcdfVariable
## GetPkgRawDataPath GetUsgsIvProduct ImproveHucMeta LoadMetaDB LsObjects Nse NseLog
## PadRange PosixOrigin RBFlash ReadNcTimeSlice ReshapeMultiNcdf Rmse RmseNorm RotateCcw
## RotateCw RoundMinutes StdLon TransTz TransUsgsProdStat WriteNcTimeSlice lsOS
## sub-.prettyUsgs subset.prettyUsgs
##
## * IO:
## AddRouteLinkGage ChanObsToTimeSlice ConvertRS2Stack ConvertStack2NC CreateBasinMask
## EditFrxstPts ExportGeogrid FindUsgsStns GapFillRS GetAmeriflux GetCoDwrData
## GetGeogridIndex GetGeogridSpatialInfo GetGhcn GetGhcn2 GetMODIS GetNWCSnowPoints
## GetPoly GetProj GetRfc GetSiteHuc GetSnodasDepthSweDate GetSnodasPointTs GetSnotel
## GetStage4Files GetTimeZone GetUsgsHucData GetUsgsIvProduct ImproveHucMeta InsertRS
## MkNudgingParams PolyToRaster PutSnodasCoordsNcdf PutSnodasNcdf ReadAmerifluxCSV
## ReadAmerifluxNC ReadChrtout ReadCoDwrGage ReadFrxstPts ReadGwOut ReadLdasoutAll
## ReadLdasoutWb ReadRouteLink ReadRtout ReadUsgsGage SaveHucData SelectGhcnGauges
##
## * manip:
## AddRouteLinkGage CalcDailyGhcn CalcNoahmpFluxes CalcNoahmpWatBudg CalcSnodasCoords
## ChanObsToTimeSlice CheckConn EditFrxstPts GatherStreamInds MkDischargeVariance
## MkNudgingParams NamedList NtwKReExToNcdf PrettyUsgs ReExpNetwork ReExpressRouteLink
## ReIndexRouteLink ReadSnodasDepthSweDate VisualizeRouteLink WriteDischargeObsSeq
## sub-.prettyUsgs subset.prettyUsgs
##
## * plot:
## multiplot
##
## * smooth:
## SmoothStack
##
## * ts:
## CalcFdcPerf CalcModPerf CalcModPerfMulti CalcStatCategorical CalcStatCont ReadChrtout
## ReadLdasoutAll ReadLdasoutWb ReadRtout
##
## * univar:
## CalcFdc CalcFdcPerf CalcFdcSpline CalcModPerf CalcModPerfMulti CalcStatCategorical
## CalcStatCont CalcStatsRS ReadChrtout ReadLdasoutAll ReadLdasoutWb ReadRtout
##
## * utilities:
## AsCharLongInt CalcDateTrunc CalcMonthDays CalcRunningMean FillOutliers FormalsToDf
## GetPkgMeta LsObjects PosixOrigin ReshapeMultiNcdf lsOS
Note the structure of the returned value which could be computed on.
str(pkgMeta)
## List of 2
## $ concept:List of 20
## ..$ Ameriflux : chr "GetAmeriflux"
## ..$ DART : chr [1:3] "MkDischargeVariance" "VisualizeChanNtwk" "WriteDischargeObsSeq"
## ..$ data : chr [1:7] "amfMeta" "gages2Attr" "gages2AttrPlus" "rfc" ...
## ..$ dataAnalysis : chr [1:2] "CalcStatsRS" "SmoothStack"
## ..$ dataGet : chr [1:25] "CreateBasinMask" "FindUsgsStns" "GetFileStat" "GetGeogridIndex" ...
## ..$ dataMgmt : chr [1:32] "AddRouteLinkGage" "CalcNoahmpFluxes" "CheckConn" "ConvertRS2Stack" ...
## ..$ geospatial : chr [1:5] "ExportGeogrid" "GetGeogridIndex" "GetGeogridSpatialInfo" "GetProj" ...
## ..$ getData : chr [1:2] "GetGeogridSpatialInfo" "GetProj"
## ..$ GHCN : chr [1:4] "CalcDailyGhcn" "GetGhcn" "GetGhcn2" "SelectGhcnGauges"
## ..$ modelEval : chr [1:10] "CalcFdc" "CalcFdcPerf" "CalcFdcSpline" "CalcModPerf" ...
## ..$ MODIS : chr [1:7] "CalcStatsRS" "ConvertRS2Stack" "ConvertStack2NC" "GapFillRS" ...
## ..$ ncdf : chr [1:3] "GetNcdfFile" "MkNcdf" "ncdump"
## ..$ nudging : chr [1:10] "AddRouteLinkGage" "ChanObsToTimeSlice" "CheckConn" "EditFrxstPts" ...
## ..$ plot : chr [1:9] "GetDomainCoordsProj" "PlotFdc" "PlotFdcCompare" "PlotPrettyUsgs" ...
## ..$ ploting : chr "multiplot"
## ..$ SNODAS : chr [1:6] "CalcSnodasCoords" "GetSnodasDepthSweDate" "GetSnodasPointTs" "PutSnodasCoordsNcdf" ...
## ..$ SNOTEL : chr "GetSnotel"
## ..$ Streamflow : chr "GetCoDwrData"
## ..$ usgs : chr "MkUsgsTimeSlice"
## ..$ usgsStreamObs: chr [1:17] "FindUsgsStns" "GetSiteHuc" "GetUsgsHucData" "GetUsgsIvProduct" ...
## ..- attr(*, "meta")= chr "concept"
## ..- attr(*, "package")= chr "rwrfhydro"
## ..- attr(*, "class")= chr [1:2] "pkgMeta" "list"
## $ keyword:List of 11
## ..$ data : chr [1:7] "amfMeta" "gages2Attr" "gages2AttrPlus" "rfc" ...
## ..$ database : chr [1:8] "LoadMetaDB" "QueryHaveSite" "QuerySiteData" "QuerySiteInfo" ...
## ..$ hplot : chr [1:9] "GetDomainCoordsProj" "PlotFdc" "PlotFdcCompare" "PlotPrettyUsgs" ...
## ..$ internal : chr [1:43] "AllSame" "AsCharLongInt" "CalcCOM" "CalcDateTrunc" ...
## ..$ IO : chr [1:47] "AddRouteLinkGage" "ChanObsToTimeSlice" "ConvertRS2Stack" "ConvertStack2NC" ...
## ..$ manip : chr [1:22] "AddRouteLinkGage" "CalcDailyGhcn" "CalcNoahmpFluxes" "CalcNoahmpWatBudg" ...
## ..$ plot : chr "multiplot"
## ..$ smooth : chr "SmoothStack"
## ..$ ts : chr [1:9] "CalcFdcPerf" "CalcModPerf" "CalcModPerfMulti" "CalcStatCategorical" ...
## ..$ univar : chr [1:12] "CalcFdc" "CalcFdcPerf" "CalcFdcSpline" "CalcModPerf" ...
## ..$ utilities: chr [1:11] "AsCharLongInt" "CalcDateTrunc" "CalcMonthDays" "CalcRunningMean" ...
## ..- attr(*, "meta")= chr "keyword"
## ..- attr(*, "package")= chr "rwrfhydro"
## ..- attr(*, "class")= chr [1:2] "pkgMeta" "list"
## - attr(*, "class")= chr [1:2] "pkgMeta" "list"
To suppress printing of the functions and see only the concepts:
GetPkgMeta(listMetaOnly = TRUE, meta='concept')
##
## -----------------------------------
## rwrfhydro concepts
## -----------------------------------
## Ameriflux
## DART
## data
## dataAnalysis
## dataGet
## dataMgmt
## geospatial
## getData
## GHCN
## modelEval
## MODIS
## ncdf
## nudging
## plot
## ploting
## SNODAS
## SNOTEL
## Streamflow
## usgs
## usgsStreamObs
Or perhaps you just want to look at certain concepts and keywords
GetPkgMeta(concept=c('plot', 'dataGet'), keyword=c('hplot', 'manip'))
##
## -----------------------------------
## rwrfhydro concepts
## -----------------------------------
## * dataGet:
## CreateBasinMask FindUsgsStns GetFileStat GetGeogridIndex GetMODIS GetMultiNcdfFile
## GetMultiNcdfVariable GetNWCSnowPoints GetSiteHuc GetStage4Files GetUsgsHucData
## GetUsgsIvProduct ImproveHucMeta ReadAmerifluxCSV ReadAmerifluxNC ReadChrtout
## ReadCoDwrGage ReadFrxstPts ReadGwOut ReadLdasoutAll ReadLdasoutWb ReadRouteLink
## ReadRtout ReadUsgsGage SaveHucData
##
## * plot:
## GetDomainCoordsProj PlotFdc PlotFdcCompare PlotPrettyUsgs VisualizeChanNtwk
## VisualizeDomain VisualizeRouteLink VisualizeSpatial VisualizeSubsetStream
##
##
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## * hplot:
## GetDomainCoordsProj PlotFdc PlotFdcCompare PlotPrettyUsgs VisualizeChanNtwk
## VisualizeDomain VisualizeRouteLink VisualizeSpatial VisualizeSubsetStream
##
## * manip:
## AddRouteLinkGage CalcDailyGhcn CalcNoahmpFluxes CalcNoahmpWatBudg CalcSnodasCoords
## ChanObsToTimeSlice CheckConn EditFrxstPts GatherStreamInds MkDischargeVariance
## MkNudgingParams NamedList NtwKReExToNcdf PrettyUsgs ReExpNetwork ReExpressRouteLink
## ReIndexRouteLink ReadSnodasDepthSweDate VisualizeRouteLink WriteDischargeObsSeq
## sub-.prettyUsgs subset.prettyUsgs
##
## * plot:
## multiplot
What were the concepts or keywords of the GetPkgMeta
and ReadAmerifluxCSV
functions?
GetPkgMeta(byFunction = c('GetPkgMeta','ReadAmerifluxCSV'))
##
## -----------------------------------
## rwrfhydro: GetPkgMeta()
## -----------------------------------
## * keyword:
## utilities
##
##
## -----------------------------------
## rwrfhydro: ReadAmerifluxCSV()
## -----------------------------------
## * concept:
## dataGet
##
## * keyword:
## IO
The function can be applied to other packages too.
GetPkgMeta(package='dataRetrieval', list=TRUE)
##
## -----------------------------------
## dataRetrieval keywords
## -----------------------------------
## countyCd
## data
## import
## internal
## IO
## manip
## service
## services
## stateCd
## USGS
## USGS,
## web
## WQP
The following show the Roxygen markdown used to tag keywords and concepts onto a function. The family field cross-references documentation with all other functions with that family.
#' @keywords internal manip
#' @concept SNODAS
#' @family SNODAS
#' @export
Internal functions (those not exported into the package namespace) should be exported but tagged with keyword “internal”. This makes the documentation available to users.
For reference, the following command lists the existing R keywords.
cat( readLines( paste0(R.home("doc"),'/KEYWORDS') ) , sep = "\n" )
## GROUPED Keywords
## ----------------
##
## Graphics
## aplot & Add to Existing Plot / internal plot
## dplot & Computations Related to Plotting
## hplot & High-Level Plots
## iplot & Interacting with Plots
## color & Color, Palettes etc
## dynamic & Dynamic Graphics
## device & Graphical Devices
##
## Basics
## sysdata & Basic System Variables [!= S]
## datasets & Datasets available by data(.) [!= S]
## data & Environments, Scoping, Packages [~= S]
## manip & Data Manipulation
## attribute & Data Attributes
## classes & Data Types (not OO)
## & character & Character Data ("String") Operations
## & complex & Complex Numbers
## & category & Categorical Data
## & NA & Missing Values [!= S]
## list & Lists
## chron & Dates and Times
## package & Package Summaries
##
## Mathematics
## array & Matrices and Arrays
## & algebra & Linear Algebra
## arith & Basic Arithmetic and Sorting [!= S]
## math & Mathematical Calculus etc. [!= S]
## logic & Logical Operators
## optimize & Optimization
## symbolmath & "Symbolic Math", as polynomials, fractions
## graphs & Graphs, (not graphics), e.g. dendrograms
##
## Programming, Input/Ouput, and Miscellaneous
##
## programming & Programming
## & interface& Interfaces to Other Languages
## IO & Input/output
## & file & Files
## & connection& Connections
## & database & Interfaces to databases
## iteration & Looping and Iteration
## methods & Methods and Generic Functions
## print & Printing
## error & Error Handling
##
## environment & Session Environment
## internal & Internal Objects (not part of API)
## utilities & Utilities
## misc & Miscellaneous
## documentation & Documentation
## debugging & Debugging Tools
##
## Statistics
##
## datagen & Functions for generating data sets
## distribution & Probability Distributions and Random Numbers
## univar & simple univariate statistics [!= S]
## htest & Statistical Inference
## models & Statistical Models
## & regression& Regression
## & &nonlinear& Non-linear Regression (only?)
## robust & Robust/Resistant Techniques
## design & Designed Experiments
## multivariate & Multivariate Techniques
## ts & Time Series
## survival & Survival Analysis
## nonparametric & Nonparametric Statistics [w/o 'smooth']
## smooth & Curve (and Surface) Smoothing
## & loess & Loess Objects
## cluster & Clustering
## tree & Regression and Classification Trees
## survey & Complex survey samples
##
##
## MASS (2, 1997)
## --------------
##
## add the following keywords :
##
## classif & Classification ['class' package]
## spatial & Spatial Statistics ['spatial' package]
## neural & Neural Networks ['nnet' package]