]> git.donarmstrong.com Git - ape.git/blobdiff - R/compute.brtime.R
fix in c.multiPhylo()
[ape.git] / R / compute.brtime.R
index 727fcb6a37dc9fb261f8e4187d3f3d441a7293ed..822f6f2732f88806c2a071e913f69b06db1df682 100644 (file)
@@ -1,4 +1,4 @@
-## compute.brtime.R (2011-07-15)
+## compute.brtime.R (2011-07-26)
 
 ##   Compute and Set Branching Times
 
@@ -19,9 +19,9 @@ compute.brtime <-
     ## x: branching times (aka, node ages or heights)
 
     if (identical(method, "coalescent")) { # the default
-        x <- 2 * rexp(n - 1)/(as.double(n:2) * as.double((n - 1):1))
-        if (is.null(force.positive))
-            force.positive <- TRUE
+        x <- 2 * rexp(m)/(as.double((m + 1):2) * as.double(m:1))
+        ## x <- 2 * rexp(n - 1)/(as.double(n:2) * as.double((n - 1):1))
+        if (is.null(force.positive)) force.positive <- TRUE
     } else if (is.numeric(method)) {
         x <- as.vector(method)
         if (length(x) != m)