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, na.action)
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. |
na.action |
A function which indicates what should happen
when the data contain |
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)
R. Lopaka Lee <rclee@usgs.gov>
Dennis Helsel <dhelsel@practicalstats.com>
See Also
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.6-1.1 Index]