center_df: center_df

Description Usage Arguments Details Value Author(s) Examples

View source: R/utility_functions.r

Description

Scale and/or center the numeric columns of a data frame or tibble

Usage

1
center_df(data, sc = FALSE, cen = TRUE)

Arguments

data

A data frame or tibble

sc

Scale the variables (default FALSE)

cen

Center the variables on their means (default TRUE)

Details

Takes a data frame or tibble as input and scales and/or centers the numeric columns. By default, centers but doesn't scale

Value

An object of the same class as 'data', with the numeric columns scaled or centered as requested

Author(s)

Kieran Healy

Examples

1

kjhealy/socviz documentation built on July 20, 2020, 7:36 a.m.