demean: Demean a vector or a matrix (by column)

Description Usage Arguments Value Author(s) Examples

View source: R/demean.r

Description

Demean a vector or a matrix (by column)

Usage

1
demean(x)

Arguments

x

Vector or matrix

Value

Demeaned value of x

Author(s)

TszKin Julian Chan [email protected]

Examples

1
2
x<-matrix(1:20,ncol=2)
demean(x)

Example output

      [,1] [,2]
 [1,] -4.5 -4.5
 [2,] -3.5 -3.5
 [3,] -2.5 -2.5
 [4,] -1.5 -1.5
 [5,] -0.5 -0.5
 [6,]  0.5  0.5
 [7,]  1.5  1.5
 [8,]  2.5  2.5
 [9,]  3.5  3.5
[10,]  4.5  4.5

Jmisc documentation built on May 30, 2017, 6:21 a.m.

Related to demean in Jmisc...