Package: ape
Version: 2.3
-Date: 2009-02-20
+Date: 2009-03-04
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
-## drop.tip.R (2009-01-07)
+## drop.tip.R (2009-03-04)
## Remove Tips in a Phylogenetic Tree
stop("the tree has no node labels")
node <- which(phy$node.label %in% node) + Ntip
}
- if (node <= Ntip) stop("node number must be greater than the number of tips")
+ if (node <= Ntip)
+ stop("node number must be greater than the number of tips")
if (node == ROOT) return(phy)
phy <- reorder(phy) # insure it is in cladewise order
root.node <- which(phy$edge[, 2] == node)
## 2) renumber the remaining tips now
TIPS <- phy$edge[, 2] <= Ntip
## keep the ordering so no need to reorder tip.label:
- phy$edge[TIPS, 2] <- order(phy$edge[TIPS, 2])
+ phy$edge[TIPS, 2] <- rank(phy$edge[TIPS, 2])
Ntip <- length(phy$tip.label) # update Ntip
## make new tip labels if necessary
phy$edge[sndcol, 2] <- newNb[phy$edge[sndcol, 2]] <-
(Ntip + 2):(Ntip + phy$Nnode)
phy$edge[, 1] <- newNb[phy$edge[, 1]]
-
+ storage.mode(phy$edge) <- "integer"
collapse.singles(phy)
}
plot(tree.owls, type = "u", use.edge.length = FALSE)
layout(matrix(1))
-data(xenarthra)
-plot(xenarthra)
-### remove the margins...
-plot(xenarthra, no.margin = TRUE)
-### ... and use a smaller font size
-plot(xenarthra, no.margin = TRUE, cex = 0.8)
-plot(xenarthra, type = "c", no.margin = TRUE,
- use.edge.length = FALSE, cex = 0.8)
-par(mar = c(5.1, 4.1, 4.1, 2.1))
-
data(bird.orders)
### using random colours and thickness
plot(bird.orders,