I have a data frame with IDs (names), as shown below:
head(ped1)
V1 V2 V3
31701 31272 25526
31702 31272 26002
31703 31272 25861
31704 31272 24324
31705 31272 31413
31706 31272 31701
I need to attribute for each element of the first column new IDs (sequential numbers). Furthermore, the ID in column V1 can show up in V2 and V3.
So the ID has to match in other columns as well, like this:
head(ped1)
V1 V2 V3
1 7 8
2 7 9
3 7 10
4 7 11
5 7 12
6 7 1
How do I attribute new IDs?