[R] replacing random repeated numbers with a series of sequenced numbers
york8866
yu_york at hotmail.com
Thu Oct 18 03:16:06 CEST 2012
Hi all,
I have a dataset with one column like below:
ID
1001
1001
1001
1122
1122
1122
1421
1421
1789
1789
..
These numbers are no in sequence and they have different repeats. How could
replace them with sequenced numbers?
Such as follows replacing the ID column with the SID column.
ID SID
1001 1001
1001 1001
1001 1001
1122 1002
1122 1002
1122 1002
1421 1003
1421 1003
1789 1004
1789 1004
Thanks,
--
View this message in context: http://r.789695.n4.nabble.com/replacing-random-repeated-numbers-with-a-series-of-sequenced-numbers-tp4646559.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list