Hi, Check the functions merge_all and merge_recurse from the reshape package. I think you're looking for the latter function.
Cheers!! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- On Fri, 5/7/10, Jeff Newmiler <jdnew...@dcn.davis.ca.us> wrote: From: Jeff Newmiler <jdnew...@dcn.davis.ca.us> Subject: Re: [R] Merge Multiple Datasets To: "Wang, Kevin (SYD)" <kevinw...@kpmg.com.au>, r-help@r-project.org Date: Friday, May 7, 2010, 5:19 AM If your new datasets have similar measurements, you might consider rbind and adding a new column to distinguish the data sources. "Wang, Kevin (SYD)" <kevinw...@kpmg.com.au> wrote: >Hi, > >I've got a bunch of datasets (each has an "ID" column) that I'd like to >merge into one big datasets. > >After a google search I found >http://tolstoy.newcastle.edu.au/R/help/05/08/11131.html . However, I'm >wondering if there is an easy way to do this as I've got about 12 >datasets to be merged (all in the same format: an "ID" column and a >"Frequency" column")? Also, as I'm expecting more individual datasets >to come in, I'm trying to automate my code so I don't have to keep >manually adding in datasets into the merge() function. > >Any suggestions would be greatly appreciated. > >Cheers >Kev > >Kevin Wang >> Senior Advisor, Health and Human Services Practice >> Government Advisory Services >> >> KPMG >> 10 Shelley Street >> Sydney NSW 2000 Australia >> >> Tel +61 2 9335 8282 >> Fax +61 2 9335 7001 >> >kevinw...@kpmg.com.au > >> Protect the environment: think before you print >> >> > > > [[alternative HTML version deleted]] > >______________________________________________ >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. [[alternative HTML version deleted]]
______________________________________________ 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.