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

Updated help files.

parent 3b2505b5
No related branches found
No related tags found
1 merge request!13Added multiple sites to site requests.
......@@ -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}
......
......@@ -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}
......
......@@ -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}
......
......@@ -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}
......
......@@ -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/"
......
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