首页 > 解决方案 > 为什么 adgenet 的 find.clusters 不起作用?

问题描述

我试图找到不。使用 find.clusters 函数 od adegenet 对我的数据中的集群进行计数,但我一直遇到错误。

> 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)

错误:

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

标签: r

解决方案


推荐阅读