[R] union of two data frames

AA aa2007r at gmail.com
Tue Feb 26 00:14:15 CET 2008


There is a merge function in the "zoo" package that deals with time series.
There have been couple of threats about it recently. Do a search.
Specially look for solutions proposed by Gabor Grothendieck regarding merge 
in
those threats. (It was very helpful for me Tnx to Gabor).
you could begin by ?merge.zoo
Good Luck.
AA.
----- Original Message ----- 
From: "stephen sefick" <ssefick at gmail.com>
To: "Erik Iverson" <iverson at biostat.wisc.edu>; <r-help at r-project.org>
Sent: Monday, February 25, 2008 5:37 PM
Subject: Re: [R] union of two data frames


> On Mon, Feb 25, 2008 at 5:35 PM, stephen sefick <ssefick at gmail.com> wrote:
>> DateTime var1 var2 var3 var4 var5 var6
>>      .         .        .      .     .      .      .
>>      .         .         .      .    .      .      .
>>      .         .        .     .      .       .     .
>>  1/5/06      1     2     3     4     5     6
>>  1/6/06      1     2     3     4     5     6
>>  1/7/06      3     4     5     6     7     8
>>  1/8/06      4     5     6     7     8     9
>>
>>
>>
>>  DateTime var1 var2 var3 var4 var5 var6
>>  1/5/06      1     2     3     4     5     6
>>  1/6/06      1     2     3     4     5     6
>>  1/7/06      3     4     5     6     7     8
>>  1/8/06      4     5     6     7     8     9
>>      .         .        .      .     .      .      .
>>      .         .         .      .    .      .      .
>>      .         .        .     .      .       .     .
>>
>>
>>  I would like to combine two data frames similar to these
>
> into this
> DateTime var1 var2 var3 var4 var5 var6
>>      .         .        .      .     .      .      .
>>      .         .         .      .    .      .      .
>>      .         .        .     .      .       .     .
>>  1/5/06      1     2     3     4     5     6
>>  1/6/06      1     2     3     4     5     6
>>  1/7/06      3     4     5     6     7     8
>>  1/8/06      4     5     6     7     8     9
>>      .         .        .      .     .      .      .
>>      .         .         .      .    .      .      .
>>      .         .        .     .      .       .     .
>>
>>
>>  On Mon, Feb 25, 2008 at 5:08 PM, Erik Iverson <iverson at biostat.wisc.edu> 
>> wrote:
>>  > You probably need to provide an example here, show us your data.frame
>>  >  column names, and what you mean by 'common subset of the same data' 
>> at
>>  >  least.  What did you try and what did it do that you didn't expect?
>>  >
>>  >
>>  >
>>  >  stephen sefick wrote:
>>  >  > I have a thirty thousand row data frame imported from excel and a
>>  >  > 60,000 row data frame imported from excel.  they share a common 
>> subset
>>  >  > of the same data and I would like to combine the two into one data
>>  >  > frame merged together on the data in common.  I have looked at the
>>  >  > help file for merge and intersect and cbind and rbind etc... And I
>>  >  > can't figure it out.  Thanks in advance
>>  >  >
>>  >  > Stephen
>>  >  >
>>  >
>>
>>
>>
>>
>>
>> --
>>  Let's not spend our time and resources thinking about things that are
>>  so little or so large that all they really do for us is puff us up and
>>  make us feel like gods.  We are mammals, and have not exhausted the
>>  annoying little problems of being mammals.
>>
>>                                                                 -K. 
>> Mullis
>>
>
>
>
> -- 
> Let's not spend our time and resources thinking about things that are
> so little or so large that all they really do for us is puff us up and
> make us feel like gods.  We are mammals, and have not exhausted the
> annoying little problems of being mammals.
>
> -K. Mullis
>
> ______________________________________________
> 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.



More information about the R-help mailing list