summary.phylo: Print Summary of a Phylogeny

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/summary.phylo.R

Description

The first function prints a compact summary of a phylogenetic tree (an object of class "phylo"). The three other functions return the number of tips, nodes, or edges, respectively.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S3 method for class 'phylo'
summary(object, ...)

Ntip(phy)
## S3 method for class 'phylo'
Ntip(phy)
## S3 method for class 'multiPhylo'
Ntip(phy)

Nnode(phy, ...)
## S3 method for class 'phylo'
Nnode(phy, internal.only = TRUE, ...)
## S3 method for class 'multiPhylo'
Nnode(phy, internal.only = TRUE, ...)

Nedge(phy)
## S3 method for class 'phylo'
Nedge(phy)
## S3 method for class 'multiPhylo'
Nedge(phy)

Arguments

object, phy

an object of class "phylo" or "multiPhylo".

...

further arguments passed to or from other methods.

internal.only

a logical indicating whether to return the number of internal nodes only (the default), or of internal and terminal (tips) nodes (if FALSE).

Details

The summary includes the numbers of tips and of nodes, summary statistics of the branch lengths (if they are available) with mean, variance, minimum, first quartile, median, third quartile, and maximum, listing of the first ten tip labels, and (if available) of the first ten node labels. It is also printed whether some of these optional elements (branch lengths, node labels, and root edge) are not found in the tree.

summary simply prints its results on the standard output and is not meant for programming.

Value

A NULL value in the case of summary, a single numeric value for the three other functions.

Author(s)

Emmanuel Paradis

See Also

read.tree, summary for the generic R function, multiphylo, c.phylo

Examples

1
2
3
4
5

Example output

Phylogenetic tree: bird.families 

  Number of tips: 137 
  Number of nodes: 135 
  Branch lengths:
    mean: 7.413653 
    variance: 38.49237 
    distribution summary:
   Min. 1st Qu.  Median 3rd Qu.    Max. 
   0.10    1.15    9.10   11.50   27.00 
  No root edge.
  First ten tip labels: Struthionidae 
                        Rheidae
                        Casuariidae
                        Apterygidae
                        Tinamidae
                        Cracidae
                        Megapodiidae
                        Phasianidae
                        Numididae
                        Odontophoridae
  No node labels.
[1] 137
[1] 135
[1] 271

ape documentation built on April 25, 2021, 9:06 a.m.