Description Usage Arguments Value Examples
View source: R/utilities-data-validation.R
Takes as input a numeric vector x of length n and replaces any values in x greater than max with max, and any values less than min with min
1 | censorData1D(x, rng)
|
x |
Numeric vector of length n |
rng |
Range of values allowed in x, as a single (min, max) tuple |
numeric vector of length n equal to x except with any values in x larger than max replaced with max and any values in x smaller than min replaced with min.
1 2 | censorData1D(1:7, (2,5)) #returns c(2,2,3,4,5,5,5)
censorData1D(c(1,9,7,3,0), (2,5)) #returns(c(2,5,5,3,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.