| pctCen {NADA} | R Documentation |
pctCen is a simple, but convenient, function that calculates
the percentage of censored values.
pctCen(obs, censored)
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. |
100*(length(obs[censored])/length(obs))
pctCen returns a single numeric value representing
the percentage of values censored in the ``obs" vector.
Lopaka(Rob) Lee <rclee@usgs.gov>
Dennis Helsel <dhelsel@usgs.gov>
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)