chkinp.RdCheck input data for IPI
chkinp(stations, phab, qa = TRUE, allerr = TRUE, log = FALSE)
| stations |
|
|---|---|
| phab |
|
| qa | logical value passed from |
| allerr | logical indicating if all errors are returned or the first encountered |
| log | logical indicating if errors are printed to log in the workign directory, applies only if |
An error message is returned if the input data are not correctly formatted. If a dataset has multiple errors, only the first is returned.
This function checks the following:
No duplicate station rows in stations
All required PHAB variables are present in the variable field of phab for each station and sample date. An exception is made for XC, PCT_POOL, and XFC_ALG, which are not necessary for the IPI but are used for optional quality assurance checks.
No duplicate results for PHAB variables at each station and sample date
All input variables for stations and phab are non-negative, excluding elevation variables in stations which may be negative if below sea level (i.e., some locations in southeast California). The variable XBKF_W in phab must also be greater than zero.
chkinp(stations, phab)#> NULL