bound | R Documentation |
This helper function bounds a numeric vector on a minimum and maximum value.
bound(x, min = 0.01, max = 0.99)
x |
Numeric vector to be bounded |
min |
Minimum allowed value for vector "x"; default is |
max |
Maximum allowed value for vector "x"; default is |
Numeric vector of the same length as x
with no values less than minimum
nor greater than maximum
.
x <- rnorm(1000, 0.5, 0.5) bound(x) bound(x, min = 0.2, max = 0.8) bound(x, min = -0.1, max = 1.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.