Skip to content
Prev 215242 / 398500 Next

replace id by running number

try this:

y <- c(4,4,4,2,45,12,12)
match(y, unique(y))


I hope it helps.

Best,
Dimitris
On 3/27/2010 4:42 PM, sun wrote: