R/bounds.r
censor.Rd
Censor any values outside of range
censor(x, range = c(0, 1), only.finite = TRUE)
numeric vector of values to manipulate.
numeric vector of length two giving desired output range.
if TRUE (the default), will only modify finite values.
TRUE
censor(c(-1, 0.5, 1, 2, NA))#> [1] NA 0.5 1.0 NA NA