powered by
These functions gives the node (nodeId) or edge (edgeId) identity.
nodeId
edgeId
nodeId(x, type = c("all", "tip", "internal", "root"))# S4 method for phylo4 nodeId(x, type = c("all", "tip", "internal", "root"))edgeId(x, type = c("all", "tip", "internal", "root"))# S4 method for phylo4 edgeId(x, type = c("all", "tip", "internal", "root"))
# S4 method for phylo4 nodeId(x, type = c("all", "tip", "internal", "root"))
edgeId(x, type = c("all", "tip", "internal", "root"))
# S4 method for phylo4 edgeId(x, type = c("all", "tip", "internal", "root"))
a phylo4 or phylo4d object.
phylo4
phylo4d
a character vector indicating which subset of the nodes or edges you are interested in.
an integer vector indicating node numbers
a character vector indicating the edge identity
nodeId returns the node in ascending order, and edgeId in the same order as the edges are stored in the edge matrix.
# NOT RUN { data(geospiza) identical(nodeId(geospiza, "tip"), 1:nTips(geospiza)) nodeId(geospiza, "internal") edgeId(geospiza, "internal") nodeId(geospiza, "root") # }
Run the code above in your browser using DataLab