-## me.R (2012-04-30)
+## me.R (2012-09-14)
## Tree Estimation Based on Minimum Evolution Algorithm
labels <- attr(X, "Labels")
if (is.null(labels)) labels <- as.character(1:N)
labels <- labels[ans[[3]]]
- structure(list(edge = cbind(ans[[7]], ans[[8]]),
- edge.length = ans[[9]],
- tip.label = labels, Nnode = N - 2L),
- class = "phylo")
+ obj <- list(edge = cbind(ans[[7]], ans[[8]]),
+ edge.length = ans[[9]],
+ tip.label = labels, Nnode = N - 2L)
+ class(obj) <- "phylo"
+ attr(obj, "order") <- "cladewise"
+ obj
}
fastme.ols <- function(X, nni = TRUE)
labels <- attr(X, "Labels")
if (is.null(labels)) labels <- as.character(1:N)
labels <- labels[ans[[3]]]
- structure(list(edge = cbind(ans[[5]], ans[[6]]),
- edge.length = ans[[7]],
- tip.label = labels, Nnode = N - 2L),
- class = "phylo")
+ obj <- list(edge = cbind(ans[[5]], ans[[6]]),
+ edge.length = ans[[7]],
+ tip.label = labels, Nnode = N - 2L)
+ class(obj) <- "phylo"
+ attr(obj, "order") <- "cladewise"
+ obj
}
bionj <- function(X)