procDERM | R Documentation |
Processes DERM data to facilitate analysis and integration with DataForEver data. Adjusts parameter names and units to match DataForEver.
procDERM(filename = "/opt/physical/troy/RDATA/biscayne/data/data_BBWQall_20180517.txt",
remove_QC_codes = c("B|H|J|K|Q|Y|\\?|\\*"),
new_names = c("stn", "date", "time", "param", "method", "units",
"QCcode", "mdl", "value", "dilution.factor", "depth", "depth.code",
"x", "y", "matrix", "labComments", "project", "genComments", "lab",
"year", "mo", "day", "datetime"))
filename |
a character vector file address for DERM data, saved as a tab-delimited text file. |
remove_QC_codes |
Quality control codes to remove from the dataset. |
new_names |
names of columns in output (changing this is not recommended) |
This function is tailored specifically for DERM datasets.
dataframe procDERM
returns a dataframe with water quality measurements, with parameter names and units that match DataForEver data.
none
## Not run:
a <- procDERM()
head(a)
### merge two DERM datasets, keeping duplicates that appear in the more recent dataset
b <- procDERM(filename = "/opt/physical/troy/RDATA/biscayne/data/data_DERM_20190401.txt")
a$id <- paste(a$datetime, a$stn, a$param, sep = "-")
b$id <- paste(b$datetime, b$stn, b$param, sep = "-")
bbDat <- rbind(b, a[!a$id %in% b$id, ])
# write.csv(bbDat, file = "/opt/physical/troy/RDATA/biscayne/data_for_Donatto_DERM.csv")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.