Hi Peter,
I could not replicate the behavior you mentioned.
Could
you please send me a subset of your data that replicates the behavior
you see to my personal e-mail:
luis.m...@gmail.com. The code below
shows how you can subset your data and save it. Please send me the file
“test.rds” as in the code example below and also the code you are using.
library(dartR)
# subset loci
# you can increase the number of loci to subsample for example n=400
test <- gl.subsample.loci(
your_data.gl,n=200,method = "random")
#subset individuals
# you can increase the number of individuals to subsample by using for example indNames(test)[1:20]
test <- gl.keep.ind(test,ind.list = indNames(test)[1:10])
# saving object in the working directory
saveRDS(test, "test.rds")
You can check the pages 12 and 13 of the below tutorial for some easy ways to reassign individuals to populations.
Cheers,
Luis