Re: [R] Merging data frames one of which is NULL

2010-11-09 Thread Dimitri Liakhovitski
Thanks a lot, Phil. I decided to do it via the list - as you suggested, but had to do some gymnastics, which Reduce will greatly help me to avoid now! Dimitri On Tue, Nov 9, 2010 at 12:36 PM, Phil Spector wrote: > Dimitri - >   Usually the easiest way to solve problems like this > is to put all t

Re: [R] Merging data frames one of which is NULL

2010-11-09 Thread Phil Spector
Dimitri - Usually the easiest way to solve problems like this is to put all the dataframes in a list, and then use the Reduce() function to merge them all together at the end. You don't give many details about how the data frames are constructed, so it's hard to be specific about the best way

Re: [R] Merging data frames one of which is NULL

2010-11-09 Thread Dimitri Liakhovitski
Thanks a lot, Joshua. You might be right. I am thinking of creating a list (as a placeholder) and then merging the elements of the list. Dimitri On Tue, Nov 9, 2010 at 12:11 PM, Joshua Wiley wrote: > Hi Dimitri, > > I have some doubts whether storing the results of a loop in a data > frame and me

Re: [R] Merging data frames one of which is NULL

2010-11-09 Thread Joshua Wiley
Hi Dimitri, I have some doubts whether storing the results of a loop in a data frame and merging it with every run is the most efficient way of doing things, but I do not know your situation. This does what you want, I believe, but I suspect it could be quite slow. I worked around the placeholde