[R] scaling-centering a vector using an index

Thomas de Cornulier oedic at cebc.cnrs.fr
Wed Sep 4 18:32:25 CEST 2002


dear all,
I would like to center and scale some columns of a data frame (these
include NAs) according to the levels of an index (list of factors from
the same data frame).
I tried to code it using for loops but gave up. I guess there is a
straightforward way to achieve this: any hint welcome!
thanks a lot
thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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