You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Translate USGS product/stat codes to something readable (and vice versa).
#'
#' \code{TransUsgsProdStat} Translate USGS product/stat codes to something
#' readable (and vice versa) using a lookup table.
#' @param names Character product_stat codes (e.g. 'X_00060_00011') or their
#' translation (e.g. 'Discharge (cfs)') separated with an underscore.
#' @param whichIn Logical
#' @return if whichIn==FALSE : Character of the translation. if whichIn==TRUE :
#' Integer index which passed names are in the table.
#' @Keywords database internal
#' @concept dataMgmt usgsStreamObs
TransUsgsProdStat <- function(names, whichIn=FALSE) {
Elsewhere these rely on a single set of parentheses around the units.
prodStatLookup <- c( X_00060_00011 ='Discharge (cfs)', ##instantaneous is 00011 but not worth saying IMO
X_00060_00011_cd ='Discharge code',
X_00065_00011 ='Stage (ft)',
X_00065_00011_cd ='Stage code' )
code2Name <- any(names %in% names(prodStatLookup))
I find that the variable 'Discharge (cfs)' in new USGS RData is denoted by X_00060_00000 instead of X_00060_00011.
The text was updated successfully, but these errors were encountered:
##============================================================================================
#' Translate USGS product/stat codes to something readable (and vice versa).
#'
#' \code{TransUsgsProdStat} Translate USGS product/stat codes to something
#' readable (and vice versa) using a lookup table.
#' @param names Character product_stat codes (e.g. 'X_00060_00011') or their
#' translation (e.g. 'Discharge (cfs)') separated with an underscore.
#' @param whichIn Logical
#' @return if whichIn==FALSE : Character of the translation. if whichIn==TRUE :
#' Integer index which passed names are in the table.
#' @Keywords database internal
#' @concept dataMgmt usgsStreamObs
TransUsgsProdStat <- function(names, whichIn=FALSE) {
Elsewhere these rely on a single set of parentheses around the units.
prodStatLookup <- c( X_00060_00011 ='Discharge (cfs)', ##instantaneous is 00011 but not worth saying IMO
X_00060_00011_cd ='Discharge code',
X_00065_00011 ='Stage (ft)',
X_00065_00011_cd ='Stage code' )
code2Name <- any(names %in% names(prodStatLookup))
I find that the variable 'Discharge (cfs)' in new USGS RData is denoted by X_00060_00000 instead of X_00060_00011.
The text was updated successfully, but these errors were encountered: