[R] zero center a group of variables

Héctor Villalobos hvillalo at ipn.mx
Wed Apr 17 22:24:36 CEST 2002


*This message was transferred with a trial version of CommuniGate(tm) Pro*

A simple question, perhaps to simple, but I am new to R:
For a data frame with k variables and n1+n2 observations (two 
groups) how can i substract the group means for every variable, so 
both group variables become centered to mean zero?

Thanks in advance for your help

Héctor



...................................................
Héctor Villalobos
  Depto. de Pesquerías y Biología Marina
  Instituto Politécnico Nacional - Centro
  Interdisciplinario de Ciencias Marinas 
  (IPN-CICIMAR)
  A.P. 592. Col. Centro
  La Paz, Baja California Sur, MÉXICO. 23000
  Tel.: (+52 612) 122 53 44 ext. 2426 
  Fax.: (+52 612) 122 53 22
....................................................

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list