Hi there,
I want to rename some individuals in my genlight object and have tried this using the following code:
gl.make.recode.ind(gl, out.recode.file="SNP_recode2_ind.csv", outpath=getwd())
gl <- gl.recode.ind(gl, ind.recode="SNP_recode2_ind.csv")
gl$ind.names
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13"
[14] "14" "15" "16" "17" "18" "18.1" "19" "19.1" "20" "20.1" "21" "21.1" "22"
[27] "22.1" "23" "23.1" "24" "24.1" "25" "25.1" "26" "26.1" "33.1" "33.1" "33.1" "33.1"
[40] "33.1" "33.1" "33.1" "33.1" "33.1" "33.1" "33.1" "33.1" "33.1" "33.1" "54.1" "54.1" "54.1"
[53] "54.1" "54.1" "55" "54.1" "55" "54.1" "55" "54.1" "55" "54.1" "55" "54.1" "55"
[66] "54.1" "55" "54.1" "55" "54.1" "55" "54.1" "55" "54.1" "55" "55.1" "54.1" "55"
[79] "55.1" "54.1" "55" "55.1" "54.1" "55" "55.1" "54.1" "55" "55.1" "54.1" "55" "55.1"
However, if I check the genlight object after this, I see that a lot of numbers are repeated somehow. I checked the “SNP_recode2_ind.csv” file again, but it shows the correct numbers there.
I’ve also tried gl.edit.recode.ind() and the same thing happens that when I change one individual it changes correctly, but once I rename more it repeats some of them. Would anyone know how to solve this?
I’m using dartR version 2.7.2; 2022-12-06 [1] CRAN (R 4.2.0) and R version 2022.07.2.
Thanks in advance!
Kind regards,
Chiara