X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fcompute.brtime.R;h=35a358ab0812f6dc4e46381e8ce5bfe254122996;hb=e9f75370481c37eb9d3d811ce7494f818b423136;hp=727fcb6a37dc9fb261f8e4187d3f3d441a7293ed;hpb=1f8c4f7bf4f7100178bd11f274247ae9fac1b876;p=ape.git diff --git a/R/compute.brtime.R b/R/compute.brtime.R index 727fcb6..35a358a 100644 --- a/R/compute.brtime.R +++ b/R/compute.brtime.R @@ -1,4 +1,4 @@ -## compute.brtime.R (2011-07-15) +## compute.brtime.R (2011-07-26) ## Compute and Set Branching Times @@ -16,12 +16,12 @@ compute.brtime <- m <- phy$Nnode N <- Nedge(phy) - ## x: branching times (aka, node ages or heights) + ## x: branching times (aka, node ages, depths, 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)