pctCen {NADA}R Documentation

Calculate the percentage of values censored

Description

pctCen is a simple, but convenient, function that calculates the percentage of censored values.

Usage

pctCen(obs, censored)

Arguments

obs A numeric vector of observations. This includes both censored and uncensored observations.
censored A logical vector indicating TRUE where an observation in v is censored (a less-than value) and FALSE otherwise.

Details

100*(length(obs[censored])/length(obs))

Value

pctCen returns a single numeric value representing the percentage of values censored in the ``obs" vector.

Author(s)

Lopaka(Rob) Lee <rclee@usgs.gov>

Dennis Helsel <dhelsel@usgs.gov>

See Also

splitQual, ros,

Examples

    obs      = c(0.5,    0.5,   1.0,  1.5,   5.0,    10,   100)
    censored = c(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)

    pctCen(obs, censored) 

[Package NADA version 1.5-1 Index]