standardize_data: Standardize data

Description Usage Arguments Details Value See Also Examples

View source: R/standardize_data.r

Description

Standarize (center and scale) all numeric variables in a data.frame.

Usage

1

Arguments

data

data.frame that contains the data for standardization

center

Value TRUE or FALSE that is passed to function scale

scale

Value TRUE or FALSE that is passed to function scale

Details

The function applies the base function scale to all numeric variables in the input data.frame. When the input options base and scale do not receive logical values as input, the option defaults to TRUE.

Value

data.frame or tibble (when package tibble is available) object containing all varibales from the input data.frame where all numeric variables are scaled according to base and scale.

See Also

scale

Examples

1
2
3
  data <- supportR::create_data()
  standardize_data(data = data, center = TRUE, scale = TRUE)
  standardize_data(data = data, center = TRUE, scale = FALSE)

ha-pu/supportR documentation built on Sept. 13, 2020, 5:52 p.m.