A not so elegant way of obtaining your result (compared to merge()) would be:
> t1$ val3<-rep(t2$val3, table(t1$loc))
> t1$ val4<-rep(t2$val4, table(t1$loc))
Eugen.
--- On Tue, 2/17/09, Monica Pisica wrote:
> From: Monica Pisica
> Subject: Re: [R] joining "one-to
ee my confusion.
Again, thanks for your help,
Monica
> Date: Tue, 17 Feb 2009 10:09:17 -0500
> Subject: Re: [R] joining "one-to-many"
> From: ggrothendi...@gmail.com
> To: pisican...@hotmail.com
> CC: r-help@r-project.org
>
> T
John Tukey
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Namens Monica Pisica
Verzonden: dinsdag 17 februari 2009 15:33
Aan: R help project
Onderwerp: [R] joining "one-to-many"
Hello list,
I am wondering if a joining "one-to
Try merge(t1, t2)
On Tue, Feb 17, 2009 at 9:33 AM, Monica Pisica wrote:
>
> Hello list,
>
> I am wondering if a joining "one-to-many" can be done a little bit easier. I
> tried merge function but I was not able to do it, so I end up using for and
> if.
>
> Suppose you have a table with locatio
on 02/17/2009 08:33 AM Monica Pisica wrote:
> Hello list,
>
> I am wondering if a joining "one-to-many" can be done a little bit
easier. I tried merge function but I was not able to do it, so I end up
using for and if.
>
> Suppose you have a table with locations, each location repeated
several t
On Tue, Feb 17, 2009 at 8:33 AM, Monica Pisica wrote:
>
> Hello list,
>
> I am wondering if a joining "one-to-many" can be done a little bit easier. I
> tried merge function but I was not able to do it, so I end up using for and
> if.
>
> Suppose you have a table with locations, each location re
Hello list,
I am wondering if a joining "one-to-many" can be done a little bit easier. I
tried merge function but I was not able to do it, so I end up using for and if.
Suppose you have a table with locations, each location repeated several times,
and some attributes at that location. The se
7 matches
Mail list logo