Is this homework? Most of us object to doing homework here. If not, have you gone through any R tutorials? This looks like pretty basic stuff, and one has to wonder if you can't do this, why are you using R at all?
Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gilbert Welch On Fri, Jan 17, 2014 at 8:46 PM, Vijay <vijaychowdh...@gmail.com> wrote: > I have three data frames df.1, df.2 and df.3. All have the same structure I.e > here is df.1 > > Name network speed > Atlanta_Ga. LTE. 10 > Hartford_CT. HSPA. 4 > Seattle_WA. LTE. 12 > > I want to perform a couple of steps on each data frame and store the > transformed dataframes as df.1cleaned, df.2cleaned etc...... > > Here are the steps to perform. > > 1.Create a new column named state, given by the last two letters of the name > field > 2. Only keep rows where network is HSPA > 3. Multiple the speed column by 1000 > > So df.1cleaned would look like > Name Network. Speed. State > Hartford_CT. HSPA. 10000. CT > > Can someone help me come up with a loop or a function that loops through all > dataframes and produces all three dataframes > > Thanks > Vijay > > > Sent from my iPad > ______________________________________________ > R-help@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. ______________________________________________ R-help@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.