In each category, the order is the same. Fro example, the first match in
dat2 should return to the first record in dat2


On Tue, May 7, 2013 at 11:31 AM, Chris Stubben <stubben@lanl.gov> wrote:

> 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<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

