Learn R Programming

healthcareai (version 1.2.4)

dataScale: Center and scale columns in a numeric data frame

Description

center and scale columns in a numeric data frame using means and standard deviations

Usage

dataScale(df)

Arguments

df

A numeric data frame

Value

A list that contains a vector of column means, a vector of column sds, and a scaled data frame.

References

http://healthcare.ai

See Also

healthcareai

Examples

Run this code
# NOT RUN {
df <- data.frame(a = c(2,1,3,2,4),b = c(NA,8,6,7,9))
res <- dataScale(df)
res
# }

Run the code above in your browser using DataLab