diff --git a/R/retrieveNWISData.r b/R/retrieveNWISData.r index d4ca7a970486f20ee9f05d2843a8428b6ea782d7..fb3c7d36ccc7cec8e05ff7b34ceddcb9677ac51e 100644 --- a/R/retrieveNWISData.r +++ b/R/retrieveNWISData.r @@ -11,7 +11,7 @@ #' @param StatCd string USGS statistic code. This is usually 5 digits. Daily mean (00003) is the default. #' @param format string, can be "tsv" or "xml", and is only applicable for daily and unit value requests. "tsv" returns results faster, but there is a possiblitiy that an incomplete file is returned without warning. XML is slower, #' but will offer a warning if the file was incomplete (for example, if there was a momentary problem with the internet connection). It is possible to safely use the "tsv" option, -#' but the user must carefully check the results to see if the data returns matches what is expected. The default is therefore "xml". +#' but the user must carefully check the results to see if the data returns matches what is expected. The default is "tsv". #' @param interactive logical Option for interactive mode. If true, there is user interaction for error handling and data checks. #' @keywords data import USGS web service #' @return data dataframe with agency, site, dateTime, value, and code columns @@ -26,7 +26,7 @@ #' rawDailyTemperature <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',interactive=FALSE) #' rawDailyTemperatureTSV <- retrieveNWISData(siteNumber,'00010', startDate, endDate, StatCd='00001',format="tsv",interactive=FALSE) #' rawDailyQAndTempMeanMax <- retrieveNWISData(siteNumber,c('00010','00060'), startDate, endDate, StatCd=c('00001','00003'), interactive=FALSE) -retrieveNWISData <- function (siteNumber,ParameterCd,StartDate,EndDate,StatCd="00003",format="xml",interactive=TRUE){ +retrieveNWISData <- function (siteNumber,ParameterCd,StartDate,EndDate,StatCd="00003",format="tsv",interactive=TRUE){ url <- constructNWISURL(siteNumber,ParameterCd,StartDate,EndDate,"dv",statCd=StatCd,format=format)