Description Usage Arguments Value See Also Examples
Rescale vector to given mean and SD
1 | rescale_to(x, mu, s, na.rm = FALSE)
|
x |
numeric; values to be rescaled |
mu, sigma |
numeric; target mean and standard deviation |
na.rm |
logical; passed to |
Numeric vector of the same length as x
of the rescaled values.
scale()
and scales::rescale()
for rescaling to new
minimum and maximum.
1 2 | x <- rescale_to(rnorm(20), 100, 50)
mean(x); sd(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.