center_standard: Center or standardize

center_standardR Documentation

Center or standardize

Description

This function centers or standardizes a vector of variables, specify id if the data is longitudinal(for example, educyrs in EAS longitudinal data)

Usage

center_standard(dat, vars_vec, center = T, standard = F, id = NULL)

Arguments

dat

A tibble or dataframe of the data

vars_vec

A character vector of variables to center or standardize

center

logical, T if you want to center the variables, default is T

standard

logical, T if you want to standardize the variables, default is F

id

A character of the id column name, optional

Value

A tibble with centered or standardized variables


JiyueQin/tidyreport documentation built on Nov. 24, 2024, 9:24 a.m.