Learn R Programming

SPA3G (version 1.0)

PROJECT: Column-wise Mean Centered

Description

PROJECT returns a columnwise mean-centered matrix of the input matrix.

Usage

PROJECT(MM)

Arguments

MM
matrix

Value

Examples

Run this code

## The function is currently defined as
function (MM) 
{
    PMM <- MM - (matrix(1, n, 1) %*% apply(MM, 2, sum))/n
    return(PMM)
  }

Run the code above in your browser using DataLab