scale0 | R Documentation |
N
- 1)center and normalize a vector to 1 or to (N
- 1)
scale0(x, center = TRUE, scale = "SS1")
x |
a vector with |
center |
if |
scale |
if |
When x
comprises different values
scale0
gives the same results as scale
except for the option 'SS1'
; when x
comprises all identical values and when the
paramater scale = TRUE
, scale
gives back
a vector of NaN
(because of a division by 0 error),
whereas scale0
gives back a vector of 0
.
a scaled version of x
.
Hervé Abdi
scale
y <- scale0(c(1,2,5,10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.