vect.normalize | R Documentation |
Normalizes the given vector by dividing each element by the vector magnitude
vect.normalize(v, cent = FALSE)
v |
a vector of numerics to be normalized |
cent |
A logical. Should the vector be also centralized? |
A numeric vector containing the normalized values. Sum of squares of elements of the output vector will be 1.0.
vect.normalize(c(3, 4)) [1] 0.6 0.8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.