o drop.tip() shuffled tip labels with subtree = TRUE or trim.internal
= FALSE.
+ o Objects returned by as.hclust.phylo() failed when analysed with
+ cutree() or rect.hclust().
+
CHANGES IN APE VERSION 2.6-1
Package: ape
Version: 2.6-2
-Date: 2010-11-24
+Date: 2010-11-30
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Klaus Schliep, Korbinian Strimmer, Damien de Vienne
Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
-## as.phylo.R (2010-09-30)
+## as.phylo.R (2010-11-30)
## Conversion Among Tree Objects
if (!is.ultrametric(x)) stop("the tree is not ultrametric")
if (!is.binary.tree(x)) stop("the tree is not binary")
n <- length(x$tip.label)
- bt <- rev(branching.times(x))
- N <- length(bt)
- nm <- x$Nnode:1 + n # fix by Filipe G. Vieira (2010-09-30)
+ bt <- sort(branching.times(x))
+ inode <- as.numeric(names(bt))
+ N <- n - 1L
+ nm <- numeric(N + n) # hash table
+ nm[inode] <- 1:N
merge <- matrix(NA, N, 2)
for (i in 1:N) {
- ind <- which(x$edge[, 1] == nm[i])
- for (k in 1:2)
- merge[i, k] <- if (x$edge[ind[k], 2] <= n) -x$edge[ind[k], 2]
- else which(nm == x$edge[ind[k], 2])
+ ind <- which(x$edge[, 1] == inode[i])
+ for (k in 1:2) {
+ tmp <- x$edge[ind[k], 2]
+ merge[i, k] <- if (tmp <= n) -tmp else nm[tmp]
+ }
}
names(bt) <- NULL
- obj <- list(merge = merge, height = bt, order = 1:(N + 1),
- labels = x$tip.label, call = match.call(),
- method = "unknown")
+ obj <- list(merge = merge, height = bt, order = 1:n, labels = x$tip.label,
+ call = match.call(), method = "unknown")
class(obj) <- "hclust"
obj
}
The method, which is described in detail in Legendre et al. (2002), requires some estimates of the phylogenetic trees or phylogenetic distances, and also a description of the host-parasite associations (H-P links) observed in nature.
}
\usage{
-parafit(host.D, para.D ,HP ,nperm=999, test.links=FALSE, seed=NULL,
-correction="none", silent=FALSE)
+parafit(host.D, para.D, HP, nperm = 999, test.links = FALSE,
+ seed = NULL, correction = "none", silent = FALSE)
}
\arguments{
}
\author{Emmanuel Paradis}
\seealso{
- \code{\link{stree}}
+ \code{\link{stree}}, \code{\link{rlineage}}
}
\examples{
layout(matrix(1:9, 3, 3))