Re: [R] Adding new columns to (output) data - e.g., read 5 cols write 8

From: Esmail Bonakdarian <esmail.js_at_gmail.com>
Date: Wed, 11 Jun 2008 22:53:57 -0400

jim holtman wrote:
> yourDF <- cbind(yourDF, f=yourDF$a+yourDF$b, g=yourDF$a * 3,
> h=yourDF$c + yourDF$d)

Thanks Jim, I also learned about the transform() method from Erik which will also work beautifully.

Esmail



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 12 Jun 2008 - 02:56:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jun 2008 - 03:30:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive