[R] add columns to a data.frame
juan pablo perez
valdentro at hotmail.com
Fri Apr 12 17:37:54 CEST 2002
Dear R community:
it is possible to add a column wich results from an algebraic combination of
columns from a data frame to the same data frame?
e.g
I have a data frame like
$X: num[1:10] 10,20,25,20...
$Y: num[1:10] 152,458,698,587,...
and I want to add a new column like
$Z where Z=X+5*Y
what should I do?
Thanks in advance
Juan Pablo
_________________________________________________________________
Hable con sus amigos en línea, pruebe MSN Messenger: http://messenger.msn.es
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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