View source: R/data_scale_df.R
scale_df | R Documentation |
Applies base::scale()
to numeric, integer, or
logical columns in a data frame. Non-numeric columns are left
unchanged.
scale_df(x, center = TRUE, scale = TRUE)
x |
A data frame or matrix. |
center |
Logical; if TRUE, center the variables. |
scale |
Logical; if TRUE, scale the variables. |
If x
is not a data frame, base::scale()
is applied directly.
An object of the same class as x
.
scale_df(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.