diff --git a/man/dateFormatCheck.Rd b/man/dateFormatCheck.Rd index ece1a7ee6004fa7534bdd87731916c2e231267ed..5800f638b3e0f91691724019061fc454b7f5613f 100644 --- a/man/dateFormatCheck.Rd +++ b/man/dateFormatCheck.Rd @@ -17,6 +17,8 @@ Checks to see if format is YYYY-MM-DD. Also performs a few other date checks. \examples{ date <- '1985-01-01' dateFormatCheck(date) +dateWrong <- '1999/1/7' +dateFormatCheck(dateWrong) } \keyword{WRTDS} \keyword{flow} diff --git a/man/getDataAvailability.Rd b/man/getDataAvailability.Rd index 3e6e214702d7fc5e12f59ca255f1783104079035..805ccf8849b0acdf49348cf83413ef1ee9d9258e 100644 --- a/man/getDataAvailability.Rd +++ b/man/getDataAvailability.Rd @@ -20,7 +20,8 @@ Imports a table of available parameters, period of record, and count. # These examples require an internet connection to run availableData <- getDataAvailability('05114000') # To find just unit value ('instantaneous') data: -uvData <- availableData <- getDataAvailability('05114000',type="uv") +uvData <- getDataAvailability('05114000',type="uv") +uvDataMulti <- getDataAvailability(c('05114000','09423350'),type="uv") } \keyword{USGS} \keyword{data} diff --git a/man/getQWDataFromFile.Rd b/man/getQWDataFromFile.Rd index cc00e2c25d6fe354baed86a6079df6063b6ec5f4..4817423c35c02776c47686aa4a72c2995fbce6ae 100644 --- a/man/getQWDataFromFile.Rd +++ b/man/getQWDataFromFile.Rd @@ -26,9 +26,10 @@ be a remark column preceeding. \examples{ # Examples of how to use getQWDataFromFile: # Change the file path and file name to something meaningful: -filePath <- '~/RData/' # Sample format +filePath <- system.file("extdata", package="dataRetrieval") +filePath <- paste(filePath,"/",sep="") fileName <- 'ChoptankRiverNitrate.csv' -\dontrun{rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";")} +rawSampleData <- getQWDataFromFile(filePath,fileName, separator=";") } \keyword{data} \keyword{file} diff --git a/man/getSiteFileData.Rd b/man/getSiteFileData.Rd index 510251a333e62c267c560b20df6ae5aae1ecacc8..6affa0fc76f9340e427f37c43b2dac813bf53e12 100644 --- a/man/getSiteFileData.Rd +++ b/man/getSiteFileData.Rd @@ -3,12 +3,10 @@ \alias{getSiteFileData} \title{USGS Site File Data Retrieval} \usage{ -getSiteFileData(siteNumber = "", interactive = TRUE) +getSiteFileData(siteNumber) } \arguments{ \item{siteNumber}{string USGS site number. This is usually an 8 digit number} - -\item{interactive}{logical Option for interactive mode. If true, there is user interaction for error handling and data checks.} } \value{ retval dataframe with all information found in the expanded site file @@ -19,6 +17,7 @@ Imports data from USGS site file site. This function gets data from here: \url{h \examples{ # These examples require an internet connection to run siteINFO <- getSiteFileData('05114000') +siteINFOMulti <- getSiteFileData(c('05114000','09423350')) } \keyword{USGS} \keyword{data} diff --git a/vignettes/dataRetrieval.Rnw b/vignettes/dataRetrieval.Rnw index 3d6b42c173382c08a142a6a72f6b873d9b52269a..e20955c89472a3539281a31606b2bb380775d505 100644 --- a/vignettes/dataRetrieval.Rnw +++ b/vignettes/dataRetrieval.Rnw @@ -23,7 +23,7 @@ \usepackage{csquotes} \usepackage{setspace} -\doublespacing +% \doublespacing \renewcommand{\topfraction}{0.85} \renewcommand{\textfraction}{0.1} @@ -33,7 +33,8 @@ \usepackage{mathptmx}% Times Roman font \usepackage[scaled=.90]{helvet}% Helvetica, served as a model for arial -\usepackage{indentfirst} +% \usepackage{indentfirst} +% \setlength\parindent{20pt} \setlength{\parskip}{0pt} \usepackage{courier} @@ -99,7 +100,7 @@ singlelinecheck=false } -\setlength\parindent{20pt} + \textwidth=6.2in \textheight=8.5in @@ -757,7 +758,7 @@ Finally, qUnit is a numeric argument that defines the discharge units used in th So, if you have a file called \enquote{ChoptankRiverFlow.txt} located in a folder called \enquote{RData} on the C drive (this example is for the Windows\textregistered\ operating systems), and the file is structured as follows (tab-separated): -\singlespacing +% \singlespacing \begin{verbatim} date Qdaily 10/1/1999 107 @@ -768,7 +769,7 @@ date Qdaily 10/6/1999 98 ... \end{verbatim} -\doublespacing +% \doublespacing The call to open this file, convert the discharge to cubic meters per second, and populate the Daily data frame would be: <<openDaily, eval = FALSE>>= @@ -787,7 +788,6 @@ Microsoft\textregistered\ Excel files can be a bit tricky to import into R direc \label{sec:SampleFile} %------------------------------------------------------------ -\doublespacing The \texttt{getSampleDataFromFile} function will import a user-generated file and populate the Sample dataframe. The difference between sample data and discharge data is that the code requires a third column that contains a remark code, either blank or \verb@"<"@, which will tell the program that the data were \enquote{left-censored} (or, below the detection limit of the sensor). Therefore, the data must be in the form: date, remark, value. An example of a comma-delimited file is: \singlespacing @@ -800,7 +800,6 @@ cdate;remarkCode;Nitrate 2/3/2000,,1.54 ... \end{verbatim} -\doublespacing The call to open this file, and populate the Sample dataframe is: <<openSample, eval = FALSE>>= @@ -823,7 +822,8 @@ date rdp dp rpp pp rtp tp 2005-10-30 < 0.020 ... \end{verbatim} -\doublespacing + + <<openSample2, eval = FALSE>>= fileName <- "ChoptankPhosphorus.txt" filePath <- "C:/RData/"