load.trees {rwty} | R Documentation |
Custom functions to load tree lists so that rwty can do basic processing on the way in.
Description
Loads trees, looks for a log file of tree likelihoods and parameter values, returns an rwty.chain object containing both
Usage
load.trees(file, type = NA, format = "mb", gens.per.tree = NA,
trim = 1, logfile = NA, skip = NA)
Arguments
file |
A path to a tree file containing an MCMC chain of trees |
type |
An argument that designates the type of tree file. If "nexus",
trees are loaded using ape's |
format |
File format, which is used to find tree and log files. Currently accepted values are "mb" for MrBayes, "beast" for BEAST, "*beast" for *BEAST, and "revbayes" for RevBayes. If you would like RWTY to understand additional formats, please contact the authors and send us some sample data. |
gens.per.tree |
The number of generations separating trees. If not provided, RWTY will attempt to calculate it automatically. |
trim |
Used for thinning the chain. If a number N is provided, RWTY keeps every Nth tree. |
logfile |
A path to a file containing model parameters and likelihoods. If no path is provided but a "format" argument is supplied, RWTY will attempt to find the log file automatically based on the format definition. |
skip |
The number of lines that must be skipped to get to the header of the log file. MrBayes, for instance, prints a comment line at the top of the log file, so MrBayes files should be read in with a skip value of 1. If no "skip" value is provided but a "format" is supplied, RWTY will attempt to read logs using the skip value from the format definition. |
Value
output An rwty.chain object containing the multiPhylo and the table of values from the log file if available.
See Also
Examples
#load.trees(file="mytrees.t", format = "mb")