[adegenet-commits] r1025 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 17 18:24:24 CEST 2012


Author: jombart
Date: 2012-07-17 18:24:24 +0200 (Tue, 17 Jul 2012)
New Revision: 1025

Modified:
   pkg/R/simOutbreak.R
Log:
Minor changes (tree=FALSE)


Modified: pkg/R/simOutbreak.R
===================================================================
--- pkg/R/simOutbreak.R	2012-07-16 15:09:56 UTC (rev 1024)
+++ pkg/R/simOutbreak.R	2012-07-17 16:24:24 UTC (rev 1025)
@@ -119,8 +119,10 @@
     res$id <- 1:res$n
     res$nmut <- sapply(1:res$n, function(i) dist.dna(res$dna[c(res$id[i],res$ances[i]),], model="raw"))*ncol(res$dna)
     res$call <- match.call()
-    res$tree <- fastme.ols(dist.dna(res$dna, model="TN93"))
-    res$tree <- root(res$tree,"1")
+    if(tree){
+        res$tree <- fastme.ols(dist.dna(res$dna, model="TN93"))
+        res$tree <- root(res$tree,"1")
+    }
     class(res) <- "simOutbreak"
     return(res)
 



More information about the adegenet-commits mailing list