scaleDataFrame | R Documentation |
This function standardizes quantitative variables in a data frame while leaving the others untouched. This leaves not only factors, but also binary variables (those with values 0, 1, or NA).
scaleDataFrame(data, numsd = 1, nvals_fac = 11, exclude = NULL)
data |
A data frame. |
numsd |
Number of standard deviations to divide by - defaults to 1. |
nvals_fac |
Number of unique values required to standardize - variables with fewer than 'nvals_fac' unique values will not be standardized. |
exclude |
A character vector of names of variables to exclude from the standardization. |
A data frame with standardized quantitative variables
Dave Armstrong
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.