[adegenet-forum] error on find.clusters
Willyard, Ann
Willyard at hendrix.edu
Sat Dec 14 21:40:46 CET 2013
On my way to DAPC, I am stuck on an error finding clusters:
> grp <- find.clusters(a, max.n.clust=40)
Error in if (nf > rank) nf <- rank : missing value where TRUE/FALSE needed
I imported an SSR matrix that has 1022 individuals, 6 loci, and 47 populations:
>df <- read.loci(file.choose(), loci.sep=",", col.pop=2, col.loci=3:8)
And created a Genuind object using
>loci<-df[,3:8]
>pop<-df[,2]
>sample<-df[,1]
>a <- df2genind (loci, ncode=3, sep = ",", missing = NA, ploidy = 1, >pop=pop, ind.names=sample)
And confirmed that it is in the correct format using:
print(a, details = TRUE)
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: df2genind(X = loci, sep = ",", ncode = 3, ind.names = sample,
pop = pop, missing = NA, ploidy = 1)
@tab: 1022 x 6 matrix of genotypes
@ind.names: vector of 1022 individual names
@loc.names: vector of 6 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 6 columns of @tab
@all.names: list of 6 components yielding allele names for each locus
@ploidy: 1
@type: codom
Optionnal contents:
@pop: factor giving the population of each individual
@pop.names: factor giving the population of each individual
@other: - empty -
I am running 32 bit R version on a Windows 7 PC. I unintalled my R vers. 2.15.3 and installed R. vers. 3.0.2.
I have adegenet vers. 1.3-9.2. According to your web page, this is the most recent stable version, although adegenet-basics.pdf indicates that the adegenet version should be 1.4.
I have loaded the adegenet, pegas, MASS, and ade4 libraries.
I have searched the FAQ and every other source I can think of.
Help for an adegenet newbie will be most appreciated. NSF proposal deadline is looming ......
Ann Willyard
Assistant Professor
Hendrix College
1600 Washington Ave
Conway AR 72032
501-450-1376
Willyard at hendrix.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20131214/1b521953/attachment.html>
More information about the adegenet-forum
mailing list