Hi all,

I want to combine two data sets (ZA and ZB to get ZAB).
The common variable between the two data sets is ID.

Data  ZA
ID F  M
1  0  0
2  0  0
3  1  2
4  1  0
5  3  2
6  5  4

Data ZB

ID  v1  v2 v3
3  2.5 3.4 302
4  8.6 2.9 317
5  9.7 4.0 325
6  7.5 1.9 296

Output (ZAB)

ID F  M  v1  v2  v3
1  0  0   -9  -9  -9
2  0  0   -9  -9  -9
3  1  2  2.5 3.4 302
4  1  0  8.6 2.9 317
5  3  2  9.7 4.0 325
6  5  4  7.5 1.9 296

Any help is highly appreciated in advance,

Val

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to