getMCMCtrees {coalescentMCMC}R Documentation

Managing List of Trees From MCMC

Description

These functions help to manage trees output from MCMCs.

getMCMCtrees extracts the trees from previous MCMC runs.

saveMCMCtrees saves the lists of trees from previous runs on the user's hard disk.

cleanMCMCtrees deletes the lists of trees from previous runs (the files possibly on the hard disk are not changed).

getLastTree extracts the last tree from a list of trees (object of class "multiPhylo").

getMCMCstats returns the summary data for the different chains run during a session.

Usage

getMCMCtrees(chain = NULL)
saveMCMCtrees(destdir = ".", format = "RDS", ...)
cleanMCMCtrees()
getLastTree(X)
getMCMCstats()

Arguments

chain

an integer giving which lists of trees to extract

destdir

a character string giving the location where to save the files; by default, this is the current working directory.

format

the format of the tree files. Three choices are possible (cae-insensitive): "RDS", "Newick", "NEXUS", or any unambiguous abbreviation of these.

...

options passed to the function used to write the tree files (see below) or passed to other methods.

X

an bject of class "multiPhylo".

Details

The list of trees is returned in a specific environment and can be extracted with getMCMCtrees.

saveMCMCtrees saves the files with, by default, the RDS format using saveRDS. If format = "Newick", write.tree is used.; if format = "NEXUS", write.nexus is used. Options can be passed to any of these functions with ....

getLastTree(X) is a short-cut to X[[length(X)]].

Most functions from the package coda can also be used to analyse the MCMC outputs.

Value

getLastTree returns an object of class "phylo".

getMCMCstats returns a data frame.

Author(s)

Emmanuel Paradis

See Also

coalescentMCMC, treeOperators, subset.coalescentMCMC


[Package coalescentMCMC version 0.4-4 Index]