Skip to content
Snippets Groups Projects
Commit ff5d8fae authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Added message if user asks for reshaped, non-expanded data.

parent 1473ea62
No related branches found
No related tags found
1 merge request!52Final updates for 2.0.1
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#' @param expanded logical defaults to TRUE. If TRUE, retrieves additional information. Expanded data includes #' @param expanded logical defaults to TRUE. If TRUE, retrieves additional information. Expanded data includes
#' remark_cd (remark code), result_va (result value), val_qual_tx (result value qualifier code), meth_cd (method code), #' remark_cd (remark code), result_va (result value), val_qual_tx (result value qualifier code), meth_cd (method code),
#' dqi_cd (data-quality indicator code), rpt_lev_va (reporting level), and rpt_lev_cd (reporting level type). #' dqi_cd (data-quality indicator code), rpt_lev_va (reporting level), and rpt_lev_cd (reporting level type).
#' @param reshape logical. Will reshape the data if TRUE (default) #' @param reshape logical. Will reshape the data to a wide format if TRUE (default is FALSE). This is only
#' available for 'expanded' data.
#' @param tz character to set timezone attribute of datetime. Default is an empty quote, which converts the #' @param tz character to set timezone attribute of datetime. Default is an empty quote, which converts the
#' datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). #' datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column).
#' Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", #' Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles",
...@@ -75,6 +76,10 @@ readNWISqw <- function (siteNumbers,pCodes,startDate="",endDate="", ...@@ -75,6 +76,10 @@ readNWISqw <- function (siteNumbers,pCodes,startDate="",endDate="",
} }
if(reshape & !expanded){
message("Reshape can only be used with expanded data. Reshape request will be ignored.")
}
siteInfo <- readNWISsite(siteNumbers) siteInfo <- readNWISsite(siteNumbers)
varInfo <- readNWISpCode(pCodes) varInfo <- readNWISpCode(pCodes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment