phylotate (version 1.3)

mb_attrs: Parse MrBayes-supplied attributes from a NEXUS file

Description

This function takes a tree object and produces a dataframe containing attributes attached to each node by MrBayes.

Usage

mb_attrs(tree)

Arguments

tree

an object of type "phylo"

Value

A dataframe of attributes.

Details

The returned dataframe contains one row per node, and one column per attribute. The attributes parsed are prob, prob_stddev, length_mean, length_median, length_95_HPD_low, and length_95_HPD_high.

Attributes which are derivable from the others are not parsed (for example, the prob_percent attribute is not parsed, since it's prob times 100.

See Also

parse_annotated, read_annotated

Examples

Run this code
# NOT RUN {
  # Parse the example data included with this package
  data(finches)
  t <- parse_annotated(finches, format="nexus")

  # Obtain a table of MrBayes attributes for each node
  attrs <- mb_attrs(t)
# }

Run the code above in your browser using DataLab