scaleDataFrame: Standardize quantitative variables in a data frame

Description Usage Arguments Value Author(s)

Description

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).

Usage

1
scaleDataFrame(data, numsd = 1, nvals_fac = 11, exclude = NULL)

Arguments

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.

Value

A data frame with standardized quantitative variables

Author(s)

Dave Armstrong


DAMisc documentation built on Jan. 12, 2022, 1:07 a.m.