Description Usage Arguments Details Value Examples
Vectors are scaled to have a mean of 0.5 and standard deviation of 0.5.
1 | unit_scale(x, y = NULL, na.rm = TRUE)
|
x |
numeric vector |
y |
alternative numeric vector that contains the attributes to use to rescale x |
na.rm |
remove NAs from the vector before finding stats |
The function works similar to scale, in that attributes of the original mean and standard
deviation are saved in the object called center and scale. The adjustment is also
provided in the adj attribute.
scaled vector
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.