Description Usage Arguments Value Author(s) Examples
prepData is usually called from within fitswavecav but can be invoked directly. It performs some date calculations, removes rows with missing values for concentration or continuous variables, and returns the concentration and continuous ancillary data to be used by fitswavecav and its other internal functions.
1 | prepData(cdat, cavdat, yrstart, yrend, dcol, pnames, iwcav, qwcols)
|
cdat |
is the concentration data. |
cavdat |
is the continuous (daily) ancillary data. |
yrstart |
is the starting year of the analysis (treated as January 1 of that year). Zero means the start date will be determined by the start date of cavdat, the continuous ancillary data. |
yrend |
is the ending year of the analysis (treated as December 31 of that year). Zero means the end date will be determined by the end date of cavdat, the continuous ancillary data. |
dcol |
is the column name for the dates, should be the same for both cdat and cavdat. |
pnames |
are the parameters (water-quality constituents) to analyze (if using USGS parameters, omit the starting 'P', such as "00945" for sulfate). |
iwcav |
is a character variable indicating which continuous ancillary variables to include, if none use iwcav=c("none"). |
qwcols |
is a character vector with the beginning of the column headers for remarks code (default is R), and beginning of column headers for concentration data (default is P for parameter). |
A list. The first element is the concentration data with additional date information, missing values removed, and extra columns removed. The second element is the continuous ancillary data with additional date information, missing values removed, and extra columns removed.
Aldo V. Vecchia and Karen R. Ryberg
1 2 3 4 5 | data(swData)
modMoRivOmaha<-combineData(qwdat=qwMoRivOmaha, cqwdat=cqwMoRivOmaha)
preppedDat <- prepData(modMoRivOmaha, cqwMoRivOmaha, yrstart=1995,
yrend=2003, dcol="dates", pnames=c("04035", "04037", "04041"),
iwcav=c("flowa30","flowa1"), qwcols=c("R","P"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.