sorry for having bothering you. I found the problem. It was the a stupid error made by me. R could not recognise the variable as it is of course case sensitive for names. So I specified the wrong variable name and R did complain about it with "numeric(0)".
Ulrich
Peter Dalgaard BSA wrote:
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
-- __________________________________________________
Ulrich Leopold MSc.
Department of Physical Geography Institute for Biodiversity and Ecosystem Dynamics Faculty of Science University of Amsterdam Nieuwe Achtergracht 166 NL-1018WV Amsterdam
Phone: +31 20 525 7456 (7451 Secretary) Fax: +31 20 525 7431 Mobile: +31 64 220 3028 Email: [EMAIL PROTECTED] URL: www.science.uva.nl/ibed/research/Research_Fields/fg/stafffg/index.html
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help