clean_wq {dbhydroR} | R Documentation |
Clean raw water quality DBHYDRO data retrievals
Description
Removes extra columns associated with QA flags and QA blanks
which are used to check on potential sources of contamination. If raw is set
to TRUE, get_wq
results are converted from long (each piece of
data on its own row) to wide
format (each site x variable combination
in its own column).
Usage
clean_wq(dt, raw = FALSE, mdl_handling = "raw")
Arguments
dt |
data.frame output of |
raw |
logical default is FALSE, set to TRUE to return data in "long" format with all comments, qa information, and database codes included |
mdl_handling |
character string specifying the handling of measurement values below the minimum detection limit (MDL). Example choices for this argument include:
|
Examples
## Not run:
#check handling of values below MDL
dt <- getwq("FLAB01", "2014-09-14", "2014-09-18", "NITRATE+NITRITE-N",
raw = TRUE)
clean_wq(dt, mdl_handling = "raw")
clean_wq(dt, mdl_handling = "half")
## End(Not run)
dt <- read.csv(system.file("extdata", "testwq.csv", package = "dbhydroR"))
clean_wq(dt)