QAQC filtering for SWMP data obtained from retrieval functions, local and remote
Usage
qaqc(swmpr_in, ...)
## S3 method for class 'swmpr':
qaqc(swmpr_in, qaqc_keep = 0, trace = FALSE, ...)
Arguments
swmpr_in
input swmpr object
...
arguments passed to or from other methods
qaqc_keep
numeric vector of qaqc flags to keep, default 0
trace
logical for progress output on console, default FALSE
Value
Returns a swmpr object with NA values for records that did not match qaqc_keep. QAQC columns are also removed.
Details
The qaqc function is a simple screen to retain values from the data with specified QAQC flags, described online: http://cdmo.baruch.sc.edu/data/qaqc.cfm. Each parameter in the swmpr data typically has a corresponding QAQC column of the same name with the added prefix 'f_'. Values in the QAQC column specify a flag from -5 to 5. Generally, only data with the '0' QAQC flag should be used, which is the default option for the function. Data that do not satisfy QAQC criteria are converted to NA values. Additionally, simple filters are used to remove obviously bad values, e.g., wind speed values less than zero or pH values greater than 12. Erroneous data entered as -99 are also removed. Processed data will have QAQC columns removed, in addition to removal of values in the actual parameter columns that do not meet the criteria.