| as.lcens | R Documentation |
Converts data to a left-censored data (lcens) object: various methods.
as.lcens(values, detlim, censor.codes) ## S4 method for signature 'lcens,missing,missing' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,missing,missing' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,numeric,missing' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,numeric,logical' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,numeric,character' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,missing,logical' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'numeric,missing,character' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'qw,missing,missing' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'qw,numeric,missing' as.lcens(values, detlim, censor.codes) ## S4 method for signature 'character,missing,missing' as.lcens(values, detlim, censor.codes)
values |
numeric values representing "raw" values. Missing values are permitted. A vector of character strings is allowed when the remark code is combined with the value; blank values are treated as missing values, any other value is converted to a missing value with a warning. See Examples. |
detlim |
the corresponding detection limit of the sensor. Missing values
are permitted. Detection limits are required for each non-missing value in |
censor.codes |
optional codes indicating a left-censored value. If class
"logical," then |
An S4 object of class "lcens." These objects are the basis for the analysis of left-censored data.
All methods force values to be no less than the corresponding
detlim. All values that are less than detlim are treated
as left-censored values at detlim. This ensures unbiased analytical results.
Lorenz, D.L., in preparation
as.mcens
## The first value is censored at 2
as.lcens(c(1,3), 2)
## Set the first value to censored at that level and the detection limit is
# carried forward
as.lcens(c(1,3), censor.codes=c("<", ""))
# For combined remark and values:
as.lcens(c("<1", "1", "<1", "1", "2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.