Re: [R] data frame question

From: Stefan Grosse <singularitaet_at_gmx.net>
Date: Thu, 14 Feb 2008 18:27:07 +0100

On Thursday 14 February 2008 06:12:23 pm joseph wrote:

jo> I have a data frame df1 in which I would like to multiply col1
jo> by 2.
jo> The way I did it does not allow me to keep the old data
jo> frame.
jo>
jo>
jo> How can I do this and be able to create a new data frame
jo> df2?
jo>
jo>
jo> > df1$col1=df1$col1*2

df$col3<-df1$col1*2

Stefan



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 14 Feb 2008 - 17:36:25 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 14 Feb 2008 - 18:30:13 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