I am trying to find the no. of clusters in my data using the find.clusters function od adegenet but i keep coming across an error.
> gl.test
/// GENLIGHT OBJECT /////////
// 491 genotypes, 11,394 binary SNPs, size: 6.6 Mb
964418 (17.24 %) missing data
// Basic content
@gen: list of 491 SNPbin
// Optional content
@ind.names: 491 individual labels
@loc.names: 11394 locus labels
@chromosome: factor storing chromosomes of the SNPs
@position: integer storing positions of the SNPs
@other: a list containing: elements without names
grp <- find.clusters(gl.test, max.n.clust=40)
Error:
Choose the number PCs to retain (>=1): Error in if (n.pca >= N) warning("number of retained PCs of PCA is greater than N") :
missing value where TRUE/FALSE needed
Calls: find.clusters ... find.clusters.matrix -> find.clusters -> find.clusters.data.frame