I am using poppr for the first time and I am also new to R. I have non stratified data, 27 microsattellite loci and 260 individuals.
While performing DAPC analysis I got following:
details;
library("adegenet")
data(genalex)
pop(genalex) <- genalex$other$epid
dapc.genalex <- dapc(genalex, var.contrib = TRUE, scale = FALSE, n.pca = 30, n.da = nPop(genalex) - 1)
scatter(dapc.genalex, cell = 0, pch = 18:23, cstar = 0, mstree = TRUE, lwd = 2, lty = 2)
Error:
Error in dapc.genind(genalex, var.contrib = TRUE, scale = FALSE, n.pca = 30, :
x does not include pre-defined populations, and `pop' is not provided
> scatter(dapc.genalex, cell = 0, pch = 18:23, cstar = 0, mstree = TRUE, lwd = 2, lty = 2)
Error in scatter(dapc.genalex, cell = 0, pch = 18:23, cstar = 0, mstree = TRUE, :
object 'dapc.genalex' not found
please provide solution
>