View source: R/utilMWRsumfun.R
utilMWRsumfun | R Documentation |
Verify summary function
utilMWRsumfun(accdat, param, sumfun = "auto")
accdat |
|
param |
character string for the parameter to evaluate as provided in the |
sumfun |
character indicating one of |
This function verifies appropriate summary functions are passed from sumfun
. The mean or geometric mean output is used for sumfun = "auto"
based on information in the data quality objective file for accuracy, i.e., parameters with "log" in any of the columns are summarized with the geometric mean, otherwise arithmetic. Using "mean"
or "geomean"
for sumfun
will apply the appropriate function regardless of information in the data quality objective file for accuracy.
Character indicating the appropriate summary function based on the value passed to sumfun
.
# accuracy path
accpth <- system.file('extdata/ExampleDQOAccuracy.xlsx',
package = 'MassWateR')
# accuracy data
accdat <- readMWRacc(accpth)
# geomean auto
utilMWRsumfun(accdat, param = 'E.coli')
# mean force
utilMWRsumfun(accdat, param = 'E.coli', sumfun = 'mean')
# mean auto
utilMWRsumfun(accdat, param = 'DO')
# geomean force
utilMWRsumfun(accdat, param = 'DO', sumfun = 'geomean')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.