c: Centering of Matrix-like Objects

c.R Documentation

Centering of Matrix-like Objects

Description

Generic function that centers a vector, matrix or dataframe.

Usage

c.(x, center = NULL)

Arguments

x

a vector, matrix, or dataframe.

center

numeric. Value around which values in x will be centered? If NULL, the mean of x is used.

Details

For each item in x, subtract value specified by center.

Author(s)

Jason Grafmiller

See Also

scale, z.

Examples

x <- rnorm(100, mean = 10, sd = 5)

x.centered <- c.(x)

x.centered2 <- c.(x, center = 2)

jasongraf1/JGmisc documentation built on March 21, 2022, 7:42 a.m.