Ulrich Leopold <[EMAIL PROTECTED]> writes:

> Dear list,
> 
> could someone point me to the right command to subtract 2 columns in a
> data.frame. Might be a bit embarrassing question. But I cannot figure
> out how to do this simple command in R.

E.g.,

mydata$difference <- mydata$x - mydata$y

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])             FAX: (+45) 35327907

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to