[R] create unique ID for each group

Chris Stubben stubben at lanl.gov
Tue May 7 20:31:07 CEST 2013


> 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



More information about the R-help mailing list