Or just:

scale(mymat, scale = FALSE)

On Thu, Apr 10, 2008 at 2:03 PM, kayj <[EMAIL PROTECTED]> 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@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@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.

Reply via email to