[R] merge

From: <n.vialma_at_libero.it>
Date: Tue, 15 Jun 2010 12:37:39 +0200 (CEST)

Dear list I have two different data frame the first one is like this

CLUSTER             year          variable        value
m1                          2006         EC01              4
m1                          2007         EC01              5
m2                          2006          EC01             42
m2                          2007          EC01            9

and other variables this data frame has 800 number of rows and 14 number of columns

the second data frame has more or less the same structure

CLUSTER             year
m1                           2005
m1                          2006
m1                          2007
m2                           2005
m2                          2006
m2                          2007

This data frame has 548833 number of rows and 18 number of columns

What im trying to do is to merge the Year columns of the second data frame with the whole First data frame in order to get the following new data frame

CLUSTER             year          variable        value
m1                          2005         EC01             /
m1                          2006         EC01             4
m1                          2007         EC01             5
m2                          2005        EC01            /
m2                          2006          EC01            42
m2                          2007          EC01            9

Someone could help me???
Thanks a lot

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. Received on Tue 15 Jun 2010 - 10:42:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 11:10:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive