Yes, I tried, but the order of the IDs in dat1 and dat2 is not exactly the
same, I simplify the data here. So in dat2, it may have records for ID=0002
first then ID=0001, also I have more than two categories under ID col

I should have looked at the question more closely, sorry.   Unique ids in raw 
datasets
are pretty important, especially if observations are split into different files and you are trying to join them later. How do you know for ID 0001 and obs 1 that height is 3.2 and not 2.6, especially if order in the two files are "not exactly the same".

Chris



--

Chris Stubben

Los Alamos National Lab
Bioscience Division
MS M888
Los Alamos, NM 87545

______________________________________________
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