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

Esmail Bonakdarian esmail.js at gmail.com
Thu Jun 12 04:53:57 CEST 2008


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



More information about the R-help mailing list