plot.multiAvophylo {avotrex}R Documentation

Plot Model Fits for an 'multiAvophylo' Object

Description

S3 method for class 'multiAvophylo'. See the plot.avophylo documentation for more information.

Plots individual trees in turn (with the user required to press 'enter' to move to the next plot).

Usage

## S3 method for class 'multiAvophylo'
plot(
  x,
  tips = "extinct",
  tips_col = NULL,
  order = NULL,
  family = NULL,
  genus = NULL,
  species = NULL,
  avotrex,
  tax,
  lvls = NULL,
  ...
)

Arguments

x

An object of class 'multiAvophylo'.

tips

What tip labels to present. Can be one of "extinct" (just tip labels of extinct species), "none" (no tip labels) or "all_same" (show all labels, with same colour labels for all species), or "all_dif" (show all labels, with different colour labels for extant and extinct species). The latter needs to be used in combination with the tips_col argument.

tips_col

Colour of tip labels. If tips = "all_dif" this needs to be a vector of length two, with the first value being the colour for extinct species, and the second for extant species.

order

Prune the tree to only show a specific order (should be a character vector of length = 1). Taxonomy follows BirdTree, see the data(BirdTree_taxa) file. For extinct order names, see the data(AvotrexPhylo) file.

family

As for order, but for families.

genus

As for order, but for genera.

species

Prune the tree to only show a specific set of species. Should be a vector of at least length = 1. If only a single species name is provided, the lvls argument also needs to be provided.

avotrex

The Avotrex phylo dataset used to generate the trees. For most use cases, this will have been loaded using data(AvotrexPhylo).

tax

The Jetz et al. (2012) BirdTree taxonomy .csv. Supplied as data within the package.

lvls

If species is just a single species, how many levels back (rootward) should be plotted. Uses the tidytree::tree_subset function (see help documentation of that function for further info).

...

Other plotting arguments from the ape package's plot.phylo can be provided.

Value

Generates a phylogeny plot for each tree in x.

Examples

#See the plot.avophylo documentation for further examples
data(treesEx)
#family (plot both trees in turn)
plot(treesEx, avotrex = AvotrexPhylo, tax = BirdTree_tax,
     family = "Threskiornithidae", tips = "extinct",
     tip.color = "red", cex = 0.5)

[Package avotrex version 1.0.0 Index]