scale.data.frame: Scaling and Centering of Data Frame Objects

View source: R/scale_dataframe.R

scale.data.frameR Documentation

Scaling and Centering of Data Frame Objects

Description

scale.data.frame is generic function whose default method centers and/or scales the columns of a numeric in data frame. The non-numeric values in the data frame will remain unchanged.

In short, it is a generic function of scale.

Usage

## S3 method for class 'data.frame'
scale(x, center = TRUE, scale = TRUE)

Arguments

x

a data frame object.

center

either a logical value or numeric-alike vector of length equal to the number of columns of data frame, where ‘numeric-alike’ means that as.numeric(.) will be applied successfully if is.numeric(.) is not true.

scale

either a logical value or a numeric-alike vector of length equal to the number of columns of data frame.

Value

a data frame object.

See Also

scale


indenkun/infun documentation built on April 17, 2025, 2:52 p.m.