baytrends (version 1.1.0)

add: 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.

Value

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

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."