readTreeLog: Read BEAST trees file

Description Usage Arguments Details Value Warning See Also Examples

View source: R/tree_utils.R

Description

This function reads in a .trees file written by BEAST, BEAST2 or one of the associated packages. The input file can contain a single tree or a set of posterior trees. The input file must be in NEXUS format and must be terminated by "END;"

Usage

1
readTreeLog(filename, burnin = 0.1)

Arguments

filename

The name of the trees file to read.

burnin

Discard this proportion of trees at the start of the file.

Details

In practice the function is a wrapper for read.nexus, with the ability to easily discard some proportion of trees as burnin-in.

Value

An object of class "phylo" or "multiphylo" containing one or many trees.

Warning

The function will attempt to read the whole trees file. If the file is large this may take a long time or run out of memory.

See Also

read.nexus, read.tree

Examples

1
2
3
4
5
# Read trees file with 10% burnin
readTreeLog(filename)

# Read trees file without a burnin
readTreeLog(filename, burnin=0)

laduplessis/beastio documentation built on Dec. 14, 2021, 7:04 p.m.