Description Usage Arguments Value Author(s) Examples
View source: R/uniform-scaling.R
Applies a rescaling that transforms the values into being uniformly distributed on the interval [0, 1].
1 | uniform_scaling(values)
|
values |
A numeric vector of values |
A numeric vector that contains the rescaled values
Mathias Isaksen mathiasleanderi@gmail.com
1 2 3 4 5 6 7 8 | set.seed(123)
# Generate values from normal distribution
original.values = rnorm(100, -4, 5)
# The values lie between approximately -15.5 and 7
hist(original.values)
# Rescale values uniformly to the interval [0, 1]
uniform.values = uniform_scaling(original.values)
hist(uniform.values)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.