Description Usage Arguments Value Examples
From every element in a vector, subtract center
and
divide by scale
.
1 | scale_vector(y, center = mean, scale = sd)
|
y |
A numeric vector. |
center |
Either a function that computes center of data
(such as |
scale |
Either a function that computes variability of data
(such as |
The same object as y
just with every element scaled
1 2 3 4 5 6 | y <- 1:10
scale_vector(y)
scale_vector(y, center = median, scale = IQR)
scale_vector(y, center = 10, scale = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.