add: Add Water-Quality Data

View source: R/add.R

addR Documentation

Add Water-Quality Data

Description

Adds or subtracts water-quality data while trying to maintain the integrity of the data.

Usage

add(..., analyte, pcode = "", gt0 = TRUE)

Arguments

...

any number of water-quality (class "qw") or numeric vectors. The length of the water-quality data must all agree, but numeric values are replicated to the length of the water-quality data. See Details.

analyte

the name of the analyte, if not supplied, generated from ....

pcode

the parameter code of the analyte or any othe unique identifier the user chooses.

gt0

logical, if TRUE, then force values to be strictly non-negative on subtraction, otherwise negative values are permitted.

Details

The ... arguments must not be named in the call. Only objects of class "qw" or "numeric" are allowed. To perform a subtraction, simply preceed the argument with the unary - sign in the call. The first argument must be a positive valued object of class "qw."

Value

An object of class "qw" that is the result of the requested operations.


USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.