scaler_cat: Scaling and centering explanatory covariates

Description Usage Arguments Examples

View source: R/scaling_function.R

Description

function to scale numeric and categorical variables for multi-model approaches. Categorical covariates must be provided as factors and will be converted to 0,1 dummy variables.

Usage

1
scaler_cat(df, ID, centered = TRUE, scaled = TRUE, cats = TRUE, ...)

Arguments

df

= dataset containing all response, explanatory, and grouping factors

ID

= names of grouping variables that should not be scaled; provide as c("Var1", "Var2")

centered

= should the function center the mean at 0? (defaults to TRUE)

scaled

= should the function scale each variable by its standard deviation? (defaults to TRUE)

cats

= should the function convert categorical variables into dummies?

Examples

1

jpwrobinson/funk documentation built on Nov. 21, 2021, 11:23 p.m.