MeanCent: A function to scale data to mean 0

Description Usage Arguments Value See Also Examples

View source: R/MeanCent.R

Description

This function rescales the columns in a data matrix to have mean 0. The variance is not scaled and missing values are ignored in the calculation.

Usage

1
MeanCent(DATA)

Arguments

DATA

A (non-empty) matrix with data values. Columns should be different traits and rows unique observations of those traits

Value

Returns a matrix with the same dimensions as DATA.

See Also

ZTrans, PercentMax

Examples

1
2
3
4
5
6
7
data(Nuclei)

colMeans(Nuclei, na.rm=TRUE)

Nuclei.MC<-MeanCent(Nuclei)

colMeans(Nuclei.MC, na.rm=TRUE)

multiDimBio documentation built on April 14, 2020, 5:41 p.m.