standardise | R Documentation |
standardise()
centres and scales x
to (x - mean(x)) / sd(x)
. Output has mean 0
and standard deviation 1.
normalise()
normalises x
to (x - min(x)) / (max(x) - min(x))
. Output is
in [0,1].
Missing values are ignored in all calculations but are included in the returned vector.
base::scale()
is similar to standardise()
but adds attributes
standardise(x)
normalise(x)
x |
A numeric vector. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.