[adegenet-commits] r526 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 8 18:27:07 CET 2010


Author: jombart
Date: 2010-01-08 18:27:07 +0100 (Fri, 08 Jan 2010)
New Revision: 526

Modified:
   pkg/R/haploSim.R
Log:
A few fixes


Modified: pkg/R/haploSim.R
===================================================================
--- pkg/R/haploSim.R	2010-01-08 14:49:52 UTC (rev 525)
+++ pkg/R/haploSim.R	2010-01-08 17:27:07 UTC (rev 526)
@@ -568,6 +568,7 @@
 setOldClass("haploSim")
 setAs("haploSim", "graphNEL", def=function(from){
     N <- length(from$ances)
-    res <- ftM2graphNEL(cbind(from$ances[-1], 2:N))
+    areNA <- is.na(from$ances)
+    res <- ftM2graphNEL(cbind(from$ances[!areNA], (1:N)[!areNA]))
     return(res)
 })



More information about the adegenet-commits mailing list