| scale_protti | R Documentation |
scale_protti is used to scale a numeric vector either between 0 and 1 or around a
centered value using the standard deviation. If a vector containing only one value or
repeatedly the same value is provided, 1 is returned as the scaled value for method = "01"
and 0 is returned for metod = "center".
scale_protti(x, method, default_to_high = TRUE)
x |
a numeric vector |
method |
a character value that specifies the method to be used for scaling. "01" scales
the vector between 0 and 1. "center" scales the vector equal to |
default_to_high |
if there is only one number in the vector the "01" method will default to scale this to 1. If this argument is set to FALSE it will be scaled to 0 instead. |
A scaled numeric vector.
scale_protti(c(1, 2, 1, 4, 6, 8), method = "01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.