scale_df | R Documentation |
Similar to 'base::scale' but applies to scales / centers only numeric values in data.
scale_df(x, center = TRUE, scale = TRUE)
scale2(x, center = TRUE, scale = TRUE)
x |
dataframe or matrix |
center |
Logical, should data be centered. |
scale |
Logical, should data be scaled. |
If x
is not a dataframe, then base::scale is invoked on
x
.
Suppose x
is a dataframe. Then base::scale is invoked
on all columns that are numeric, integer or logical.
An object of same class as x
scale2(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.