Dear Members,
I am working with a genind object which is subset into populations. I want to
sample 8 individuals randomly with replacement per population and repool them
in a way that each population has unique individual names.
I am doing the following steps:
obj<- seppop(niger.data.genind)
MySamp8 <- lapply(obj, function(x) x[sample(1:nrow(x$tab), 8, replace= TRUE)])
new_samp8<- lapply(MySamp8, function(x)
repool(MySamp8[make.unique(row.names(x$tab))]))
But I am getting the following error:
Error in repool(MySamp8[make.unique(row.names(x$tab))]): x is does not contain
only valid genind objects.
Please if any one can guide me how can I get valid genind objects to repool
them in a way that each population has unique individual names.
Many thanks for your time,
Rav
[[alternative HTML version deleted]]
_______________________________________________
R-sig-genetics mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-genetics