Learn R Programming

hot.deck (version 1.2)

scaleContinuous: Standardize continuous variables.

Description

Standardizes (centers and scales) continuous variable in a dataset, leaving discrete variables untouched.

Usage

scaleContinuous(data, discrete, sdx = 1)

Arguments

data

A data frame or matrix of variables to be scaled.

discrete

Either a logical vector which is TRUE for discrete variables and FALSE for continuous ones or a vector of column numbers of discrete variables.

sdx

The standard deviation of the columns for the continuous variables.

Value

A data frame with the same dimensions as data where the continuous variables are centered and scaled.