| trim_01 | R Documentation |
Trim a vector so that all values are greater than 0 and less than 1.
trim_01(x)
x |
A numeric vector. Can be an rvec. |
If
min is lowest element of x
that is higher than 0, and
max is the highest element of x that is
lower than 1,
then trim_01()
shifts all elements of x that are lower than min
upwards, so that they equal min, and
shifts all elements of x that are higher than max
downwards, so that they equal max.
A trimmed version of x
logit(), invlogit() Logit transformation
x <- c(1, 0.98, -0.001, 0.5, 0.01)
trim_01(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.