scaleData | R Documentation |
Centers and scales all numeric- or integer-valued columns of a data frame object.
scaleData(df, sampleColName = NULL)
df |
a data frame object |
sampleColName |
column of data frame containing sample numbers (i.e., integers 1, 2, ...) for each site |
This function extracts all numeric- or integer-valued columns of a data frame object. Each of these columns is centered by subtracting its mean and then scaled by dividing the result by the standard deviation of the original column values. This linear transformation produces columns with mean zero and unit variance. Both input and output data frame objects have the same column ordering. sampleColName is only needed if data frame contains sample numbers.
The input data frame with all numeric- or integer-valued columns transformed to have mean zero and unit variance.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.