standardize: Standardize one or more variables in a data frame

Description Usage Arguments Details Value

View source: R/standardize.R

Description

Standardize by subtracting off the mean and dividing by the standard deviation.

Usage

1
standardize(df, vars)

Arguments

df

Data frame with the data to be standardized

vars

Vector of names of columns to be standardized.

Details

The mean and scale are recorded in named vectors attached to the output data frame as attributes names mean and scale, respectively.

Value

Data frame with the requested variables standardized.


JGCRI/eiamod documentation built on Feb. 14, 2020, 8:23 a.m.