[adegenet-commits] r688 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 18 16:46:42 CEST 2010


Author: jombart
Date: 2010-10-18 16:46:41 +0200 (Mon, 18 Oct 2010)
New Revision: 688

Modified:
   pkg/R/dapc.R
Log:
Minor bug corrected in a-score for n.pca=1


Modified: pkg/R/dapc.R
===================================================================
--- pkg/R/dapc.R	2010-10-18 10:44:24 UTC (rev 687)
+++ pkg/R/dapc.R	2010-10-18 14:46:41 UTC (rev 688)
@@ -340,7 +340,7 @@
     if(n.da>length(levels(x$grp))) stop("too many DA axes retained")
 
     ## perform DAPC based on permuted groups
-    lsim <- lapply(1:n.sim, function(i) summary(dapc(x$tab[,1:n.pca], sample(x$grp), n.pca=n.pca, n.da=n.da))$assign.per.pop)
+    lsim <- lapply(1:n.sim, function(i) summary(dapc(x$tab[,1:n.pca,drop=FALSE], sample(x$grp), n.pca=n.pca, n.da=n.da))$assign.per.pop)
     sumry <- summary(x)
 
     ## get the a-scores



More information about the adegenet-commits mailing list