[R] match problem

Jim Holtman
Tue, 15 Dec 2009 13:00:58 -0000

?merge

What is the problem you are trying to solve?

Sent from my iPhone.

On Dec 15, 2009, at 4:50, "Bunny, lautloscrew.com" <bunny at
lautloscrew.com
 > wrote:

> Hi all,
>
> I dont know if match is the right approach here. I?d like to match t
> o data.frames. One big dataframe and one small dataframe. In SQL, wh
> at i want to do what only be simple relation.
>
> The first consists of two columns a) some value b) some key that is
> explained in the other dataframe. What i want to do is create
> (cbind) both to one dataframe like:
>
> df1:
>
> a  b
> 1  2
> 2  3
> 3  2
> 4  2
> 5  1
>
> df2:
> 1 class1
> 2 class2
> 3 class3
>
>
> to newdf:
>
> a b class
> 1 2 class2
> 2 3 class3
> 3 2 class2
> ...
> and so forth
>
> I have connected R to several relational databases but I dont think
> it?s necessary here and that there should be a simpler solution for
> my problem. Maybe some combination of do.call, mapply, lapply or mat
> ch can do the job.
> Unfortunately I am not really familiar with these and still keep
> tryin.
>
> thx in advance for any help.
>
> Best regards
>
> matt
>
> ______________________________________________
> 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.