zscore | R Documentation |
Performs Z-score tranformation for numerical variables.
zscore(x, col = "auto", mean = NULL, sd = NULL, na.rm = FALSE)
x |
a numerical |
col |
a character vector of column names or indices. If |
mean |
a numerical value or vector indicating the |
sd |
a numerical value or vector indicating the standard deviation(s) to use for Z-score calculation; if NULL, the default is the standard deviation of |
na.rm |
a logical value indicating whether NA values in |
transformed version of x
.
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
scaler
, minmax
x = c(2.3, -1.4, 0, 3.45)
zscore(x)
zscore(x, mean = 1, sd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.