scaler: scaler

Description Usage Arguments Details Value

View source: R/scaler.r

Description

A function to center (subtract mean) and/or scale (divide by standard deviation) data column-wise in a computationally efficient way.

Usage

1
scaler(x, center = TRUE, scale = TRUE)

Arguments

x

The input matrix.

center, scale

Logical; determine if the data should be centered and/or scaled.

Details

Unlike its R counterpart scale(), the arguments center and scale can only be logical values (and not vectors).

Value

The centered/scaled data, with attributes as in R's scale().


wrathematics/coop documentation built on Nov. 26, 2021, 8:59 a.m.