Background

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.)

Setup

Load the rwrfhydro package.

library("rwrfhydro")
## To check rwrfhydro updates run: CheckForUpdates()

R help and help.search

There are several basic commands which can give insight into a package and its contents

?rwrfhydro
rwrfhydro R Documentation

rwrfhydro: Tools for working with WRF Hydro data.

Description

A community-contributed tool box for managing, analyzing, and visualizing WRF Hydro (and HydroDART) input and output files in R.

Getting started

Please visit the welcome documentation/README page at:
https://github.com/mccreigh/rwrfhydro

Other package help

Or

help(package='rwrfhydro')
##      Information on package 'rwrfhydro'
## 
## Description:
## 
## Package:           rwrfhydro
## Type:              Package
## Title:             R tools for the WRF Hydro Model
## Version:           1.0.0
## Date:              2015-05-01
## Authors@R:         c( person("James", "McCreight", email = "jamesmcc@ucar.edu", role =
##                    c("aut","cre")), person("Aubrey", "Dugger", email =
##                    "adugger@ucar.edu", 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:           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), doMC
##                    (>= 1.3.3), foreach (>= 1.4.2), curl (>= 0.5), 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, pander
## BuildVignettes:    false
## VignetteBuilder:   knitr
## Author:            James McCreight [aut, cre], Aubrey Dugger [aut]
## Built:             R 3.2.0; ; 2015-04-29 15:28:43 UTC; unix
## 
## Index:
## 
## 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.
## CalcStatsRS             Calculates summary statistics from a remote
##                         sensing time series
## 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.
## ExportGeogrid           Creates a georeferenced TIF from a geogrid
##                         variable
## FindUsgsStns            Discover USGS stations using huc8 code or
##                         lat/lon/radius.
## GetMODIS                Get MODIS data and process to match geogrid
## GetMultiNcdf            Get WRF Hydro output/restart (scalar)
##                         timeseries spread over multiple files.
## GetPkgMeta              Get a package's metadata fields and associated
##                         entries.
## GetSiteHuc              Given a USGS site code, return its HUC8.
## GetSnodasDepthSweDate   Get and unpack the SNODAS snow depth and SWE
##                         tarball for given dates.
## 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.
## 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.
## 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
## PlotPrettyData          Plot USGS site data which has been prettied
##                         with PrettyUsgs.
## PlotWatBudg             Plot water balance from WRF-Hydro (w/NoahMP)
##                         output
## 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.
## ReadAmerifluxCSV        Read standard-format CSV data downloaded from
##                         Ameriflux
## ReadAmerifluxNC         Read standard-format NetCDF data downloaded
##                         from Ameriflux
## 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.
## ReadLdasoutWb           Read WRF-Hydro (w/NoahMP) LDASOUT data files
##                         and generate basin-wide mean water budget
##                         variables.
## 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.
## 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.
## WriteDischargeObsSeq    Writes an ascii obs_seq.in file for DART binary
##                         create_obs_sequence
## gages2Attr              Gages-II attributes
## gages2AttrPlus          Gages-II attributes
## ncdump                  Emulate ncdump -h on OSX where ncdump might not
##                         be availabe.
## rwrfhydro               rwrfhydro: Tools for working with WRF Hydro
##                         data.
## subset.prettyUsgs       Subset prettyUsgs objects.
## 
## Further information is available in the following vignettes in directory
## '/Users/jamesmcc/R/Libraries/R3.2/rwrfhydro/doc':
## 
## domainChannelVis: WRF Hydro Domain and Channel Visualization (source, pdf)
## evapotranspirationEval: ET Evaluation (source, pdf)
## getMultiNetcdf: Get data from multiple netcdf files (source, pdf)
## modisProcessing: MODIS Processing (source, pdf)
## overview: An overview of rwrfhydro functionality (source, pdf)
## snodas: Collect the SNODAS product and build a local database (source, pdf)
## streamflowEval: Streamflow Evaluation (source, pdf)
## streamflowEvalMulti: Streamflow Evaluation - Multi-Basin (source, pdf)
## usgsObsDb: Collect USGS stream observations and build a local database (source, pdf)
## waterBudget: Water Budget (source, pdf)

To simply print the available (exported) functions:

ls('package:rwrfhydro')
##  [1] "AllSame"                        "CalcCOM"                       
##  [3] "CalcDates"                      "CalcFdc"                       
##  [5] "CalcFdcPerf"                    "CalcFdcSpline"                 
##  [7] "CalcMeanMinrm"                  "CalcMeanNarm"                  
##  [9] "CalcModPerf"                    "CalcModPerfMulti"              
## [11] "CalcMonthDays"                  "CalcNoahmpFluxes"              
## [13] "CalcNoahmpWatBudg"              "CalcSnodasCoords"              
## [15] "CalcStatsRS"                    "CalcWaterYear"                 
## [17] "CheckForUpdates"                "CheckMasterSha"                
## [19] "CommitGithub"                   "ConvertRS2Stack"               
## [21] "ConvertStack2NC"                "CumsumNa"                      
## [23] "ExportGeogrid"                  "FindUsgsStns"                  
## [25] "FormalsToDf"                    "gages2Attr"                    
## [27] "gages2AttrPlus"                 "GetActiveHucData"              
## [29] "GetFileStat"                    "GetGages2NwisMeta"             
## [31] "GetMODIS"                       "GetMultiNcdf"                  
## [33] "GetMultiNcdfFile"               "GetMultiNcdfVariable"          
## [35] "GetPkgMeta"                     "GetPkgRawDataPath"             
## [37] "GetRemoteMetadata"              "GetSiteHuc"                    
## [39] "GetSnodasDepthSweDate"          "GetUsgsHucData"                
## [41] "GetUsgsIvProduct"               "github_GET"                    
## [43] "ImproveHucMeta"                 "InsertRS"                      
## [45] "LoadMetaDB"                     "MkDischargeVariance"           
## [47] "MkNcdf"                         "MkUsgsTimeSlice"               
## [49] "Model3SdErrClimTaper"           "Model3SdErrPctErrPlusQntlIncpt"
## [51] "NamedList"                      "ncdump"                        
## [53] "Nse"                            "NseLog"                        
## [55] "PadRange"                       "PlotCollectStats"              
## [57] "PlotFdc"                        "PlotFdcCompare"                
## [59] "PlotFluxCompare"                "PlotLatency"                   
## [61] "PlotNStnSlice"                  "PlotPrettyData"                
## [63] "PlotWatBudg"                    "PrettyUsgs"                    
## [65] "PutSnodasCoordsNcdf"            "PutSnodasNcdf"                 
## [67] "QueryHaveSite"                  "QuerySiteData"                 
## [69] "QuerySiteInfo"                  "QuerySiteName"                 
## [71] "QuerySiteProd"                  "ReadAmerifluxCSV"              
## [73] "ReadAmerifluxNC"                "ReadCoDwrGage"                 
## [75] "ReadFrxstPts"                   "ReadGwOut"                     
## [77] "ReadLdasoutWb"                  "ReadNcTimeSlice"               
## [79] "ReadRtout"                      "ReadSnodasDepthSweDate"        
## [81] "ReadUsgsGage"                   "ReshapeMultiNcdf"              
## [83] "Rmse"                           "RmseNorm"                      
## [85] "RotateCcw"                      "RotateCw"                      
## [87] "RoundMinutes"                   "SaveHucData"                   
## [89] "SmoothStack"                    "StdLon"                        
## [91] "TransTz"                        "VisualizeChanNtwk"             
## [93] "VisualizeDomain"                "WriteDischargeObsSeq"          
## [95] "WriteNcPrettyUsgs"              "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 VisualizeDomain Visualize WRF Hydro domain files.
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 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 PlotPrettyData 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.

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
## -----------------------------------
## DART
## data
## dataAnalysis
## dataGet
## dataMgmt
## modelEval
## MODIS
## ncdf
## plot
## SNODAS
## usgs
## usgsStreamObs
## 
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## data
## database
## hplot
## internal
## IO
## manip
## 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
## -----------------------------------
## * DART:
##    MkDischargeVariance VisualizeChanNtwk VisualizeDomain WriteDischargeObsSeq
## 
## * data:
##    gages2Attr gages2AttrPlus
## 
## * dataAnalysis:
##    CalcStatsRS SmoothStack
## 
## * dataGet:
##    FindUsgsStns GetFileStat GetMODIS GetMultiNcdfFile GetMultiNcdfVariable GetSiteHuc
##    GetUsgsHucData GetUsgsIvProduct ImproveHucMeta ReadAmerifluxCSV ReadAmerifluxNC
##    ReadCoDwrGage ReadFrxstPts ReadGwOut ReadLdasoutWb ReadRtout ReadUsgsGage SaveHucData
## 
## * dataMgmt:
##    CalcNoahmpFluxes ConvertRS2Stack ConvertStack2NC ExportGeogrid InsertRS LoadMetaDB
##    MkDischargeVariance PrettyUsgs QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName
##    QuerySiteProd TransUsgsProdStat WriteDischargeObsSeq subset.prettyUsgs
## 
## * modelEval:
##    CalcFdc CalcFdcPerf CalcFdcSpline CalcModPerf CalcModPerfMulti CalcNoahmpWatBudg
##    PlotFdc PlotFdcCompare
## 
## * MODIS:
##    CalcStatsRS ConvertRS2Stack ConvertStack2NC GetMODIS InsertRS SmoothStack
## 
## * ncdf:
##    MkNcdf ncdump
## 
## * plot:
##    PlotFdc PlotFdcCompare PlotPrettyData VisualizeChanNtwk VisualizeDomain
## 
## * SNODAS:
##    CalcSnodasCoords GetSnodasDepthSweDate PutSnodasCoordsNcdf PutSnodasNcdf
##    ReadSnodasDepthSweDate
## 
## * usgs:
##    MkUsgsTimeSlice
## 
## * usgsStreamObs:
##    FindUsgsStns GetSiteHuc GetUsgsHucData GetUsgsIvProduct ImproveHucMeta LoadMetaDB
##    PlotPrettyData PrettyUsgs QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName
##    QuerySiteProd SaveHucData TransUsgsProdStat subset.prettyUsgs
## 
## 
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## * data:
##    gages2Attr gages2AttrPlus
## 
## * database:
##    LoadMetaDB QueryHaveSite QuerySiteData QuerySiteInfo QuerySiteName QuerySiteProd
##    SaveHucData TransUsgsProdStat
## 
## * hplot:
##    PlotFdc PlotFdcCompare PlotPrettyData VisualizeChanNtwk VisualizeDomain
## 
## * internal:
##    AllSame CalcCOM CalcDates CalcMeanMinrm CalcMeanNarm CalcMonthDays CalcWaterYear
##    CumsumNa FormalsToDf GetFileStat GetGithubPat GetMultiNcdfFile GetMultiNcdfVariable
##    GetPkgRawDataPath GetUsgsIvProduct ImproveHucMeta LoadMetaDB Nse NseLog PadRange
##    ReadNcTimeSlice ReshapeMultiNcdf Rmse RmseNorm RotateCcw RotateCw RoundMinutes StdLon
##    TransTz TransUsgsProdStat WriteNcTimeSlice
## 
## * IO:
##    ConvertRS2Stack ConvertStack2NC ExportGeogrid FindUsgsStns GetMODIS GetSiteHuc
##    GetSnodasDepthSweDate GetUsgsHucData GetUsgsIvProduct ImproveHucMeta InsertRS
##    PutSnodasCoordsNcdf PutSnodasNcdf ReadAmerifluxCSV ReadAmerifluxNC ReadCoDwrGage
##    ReadFrxstPts ReadGwOut ReadLdasoutWb ReadRtout ReadUsgsGage SaveHucData
## 
## * manip:
##    CalcNoahmpFluxes CalcNoahmpWatBudg CalcSnodasCoords MkDischargeVariance NamedList
##    PrettyUsgs ReadSnodasDepthSweDate WriteDischargeObsSeq subset.prettyUsgs
## 
## * smooth:
##    SmoothStack
## 
## * ts:
##    CalcFdcPerf CalcModPerf CalcModPerfMulti ReadLdasoutWb ReadRtout
## 
## * univar:
##    CalcFdc CalcFdcPerf CalcFdcSpline CalcModPerf CalcModPerfMulti CalcStatsRS
##    ReadLdasoutWb ReadRtout
## 
## * utilities:
##    FormalsToDf GetPkgMeta

Note the structure of the returned value which could be computed on.

str(pkgMeta)
## List of 2
##  $ concept:List of 12
##   ..$ DART         : chr [1:4] "MkDischargeVariance" "VisualizeChanNtwk" "VisualizeDomain" "WriteDischargeObsSeq"
##   ..$ data         : chr [1:2] "gages2Attr" "gages2AttrPlus"
##   ..$ dataAnalysis : chr [1:2] "CalcStatsRS" "SmoothStack"
##   ..$ dataGet      : chr [1:18] "FindUsgsStns" "GetFileStat" "GetMODIS" "GetMultiNcdfFile" ...
##   ..$ dataMgmt     : chr [1:16] "CalcNoahmpFluxes" "ConvertRS2Stack" "ConvertStack2NC" "ExportGeogrid" ...
##   ..$ modelEval    : chr [1:8] "CalcFdc" "CalcFdcPerf" "CalcFdcSpline" "CalcModPerf" ...
##   ..$ MODIS        : chr [1:6] "CalcStatsRS" "ConvertRS2Stack" "ConvertStack2NC" "GetMODIS" ...
##   ..$ ncdf         : chr [1:2] "MkNcdf" "ncdump"
##   ..$ plot         : chr [1:5] "PlotFdc" "PlotFdcCompare" "PlotPrettyData" "VisualizeChanNtwk" ...
##   ..$ SNODAS       : chr [1:5] "CalcSnodasCoords" "GetSnodasDepthSweDate" "PutSnodasCoordsNcdf" "PutSnodasNcdf" ...
##   ..$ usgs         : chr "MkUsgsTimeSlice"
##   ..$ usgsStreamObs: chr [1:16] "FindUsgsStns" "GetSiteHuc" "GetUsgsHucData" "GetUsgsIvProduct" ...
##   ..- attr(*, "meta")= chr "concept"
##   ..- attr(*, "package")= chr "rwrfhydro"
##   ..- attr(*, "class")= chr [1:2] "pkgMeta" "list"
##  $ keyword:List of 10
##   ..$ data     : chr [1:2] "gages2Attr" "gages2AttrPlus"
##   ..$ database : chr [1:8] "LoadMetaDB" "QueryHaveSite" "QuerySiteData" "QuerySiteInfo" ...
##   ..$ hplot    : chr [1:5] "PlotFdc" "PlotFdcCompare" "PlotPrettyData" "VisualizeChanNtwk" ...
##   ..$ internal : chr [1:31] "AllSame" "CalcCOM" "CalcDates" "CalcMeanMinrm" ...
##   ..$ IO       : chr [1:22] "ConvertRS2Stack" "ConvertStack2NC" "ExportGeogrid" "FindUsgsStns" ...
##   ..$ manip    : chr [1:9] "CalcNoahmpFluxes" "CalcNoahmpWatBudg" "CalcSnodasCoords" "MkDischargeVariance" ...
##   ..$ smooth   : chr "SmoothStack"
##   ..$ ts       : chr [1:5] "CalcFdcPerf" "CalcModPerf" "CalcModPerfMulti" "ReadLdasoutWb" ...
##   ..$ univar   : chr [1:8] "CalcFdc" "CalcFdcPerf" "CalcFdcSpline" "CalcModPerf" ...
##   ..$ utilities: chr [1:2] "FormalsToDf" "GetPkgMeta"
##   ..- 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
## -----------------------------------
## DART
## data
## dataAnalysis
## dataGet
## dataMgmt
## modelEval
## MODIS
## ncdf
## plot
## SNODAS
## 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:
##    FindUsgsStns GetFileStat GetMODIS GetMultiNcdfFile GetMultiNcdfVariable GetSiteHuc
##    GetUsgsHucData GetUsgsIvProduct ImproveHucMeta ReadAmerifluxCSV ReadAmerifluxNC
##    ReadCoDwrGage ReadFrxstPts ReadGwOut ReadLdasoutWb ReadRtout ReadUsgsGage SaveHucData
## 
## * plot:
##    PlotFdc PlotFdcCompare PlotPrettyData VisualizeChanNtwk VisualizeDomain
## 
## 
## -----------------------------------
## rwrfhydro keywords
## -----------------------------------
## * hplot:
##    PlotFdc PlotFdcCompare PlotPrettyData VisualizeChanNtwk VisualizeDomain
## 
## * manip:
##    CalcNoahmpFluxes CalcNoahmpWatBudg CalcSnodasCoords MkDischargeVariance NamedList
##    PrettyUsgs ReadSnodasDepthSweDate WriteDischargeObsSeq subset.prettyUsgs

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
## -----------------------------------
## data
## datasets
## import
## IO
## manip
## NWIS
## parameterCd
## service
## services
## USGS
## USGS,
## web
## WQP

Documenting

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]