Dear R-helpers,
I want to merge several data sets into one single data set. For example,
there are three separate data sets like:
Set 1:
id age gender
01 12 M
03 15 F
04 19 M
...
Set 2:
id time x1
01 1 0.25
01 2 0.27
01 3 0.29
03 1 0.15
03 2 0.18
04 2 0.22
04 3 0.54
...
Set 3:
id time x2
01 1 0.34
01 2 0.55
01 3 0.79
03 1 0.12
03 2 0.23
04 2 0.45
04 3 0.56
......
I want to merge the three sets into one new set as below:
id age gender time x1 x2
01 12 M 1 0.25 0.34
01 12 M 2 0.27 0.55
01 12 M 3 0.29 0.79
03 15 F 1 0.15 0.12
.......
There is also one difficulty that the order of id may be different for the
three sets and the order ot time may be different for Set 2 and Set 3.
Is there a convenient function in R to perform this operation? Thank you for
your attention.
__________________________________________________
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html