phylobase (version 0.8.2)

summary-methods: Summary for phylo4/phylo4d objects

Description

Summary of information for the tree (phylo4 only) and/or the associated data (phylo4d).

Usage

summary(object, ...)
"summary"(object, quiet = FALSE)
"summary"(object, quiet = FALSE)
nodeType(object)
"nodeType"(object)

Arguments

object
a phylo4d object
quiet
Should the summary be displayed on screen?
...
optional additional elements (not in use)

Value

The nodeType method returns named vector which has the type of node (internal, tip, root) for value, and the node number for nameThe summary method invisibly returns a list with the following components:
list("name")
the name of the object
list("nb.tips")
the number of tips
list("nb.nodes")
the number of nodes
list("mean.el")
mean of edge lengths
list("var.el")
variance of edge lengths (estimate for population)
list("sumry.el")
summary (i.e. range and quartiles) of the edge lengths
list("degree")
(optional) type of polytomy for each node: ‘node’, ‘terminal’ (all descendants are tips) or ‘internal’ (at least one descendant is an internal node); displayed only when there are polytomies
list("sumry.tips")
(optional) summary for the data associated with the tips
list("sumry.nodes")
(optional) summary for the data associated with the internal nodes

See Also

phylo4d-methods constructor and phylo4d class.

Examples

Run this code
  tOwls <- "(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);"
  tree.owls <- ape::read.tree(text=tOwls)
  P1 <- as(tree.owls, "phylo4")
  P1
  summary(P1)
  nodeType(P1)

  ## summary of a polytomous tree
  E <- matrix(c(
      8,  9,
      9, 10,
     10,  1,
     10,  2,
      9,  3,
      9,  4,
      8, 11,
     11,  5,
     11,  6,
     11,  7,
      0,  8), ncol=2, byrow=TRUE)

  P2 <- phylo4(E)
  nodeLabels(P2) <- as.character(nodeId(P2, "internal"))
  plot(P2, show.node.label=TRUE)
  sumryP2 <- summary(P2)
  sumryP2

Run the code above in your browser using DataCamp Workspace