Re: [R] subtract the mean from each column

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 10 Apr 2008 14:21:11 -0300

Or just:

scale(mymat, scale = FALSE)

On Thu, Apr 10, 2008 at 2:03 PM, kayj <kjaja27_at_yahoo.com> wrote:

>
> Hi,
>
> I am new to R an dI need some help
> I have a matrix of real values 100*300 and I would like to calculate the
> mean for each column , then for each entry in a column i need to subtract
> the mean so I will have a matrix where the columns have zero mean. any one
> know how to do that . Thanks
> --
> View this message in context:
> http://www.nabble.com/subtract-the-mean-from-each-column-tp16610489p16610489.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Thu 10 Apr 2008 - 17:37:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Apr 2008 - 18:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive