View source: R/mergePosterior.R
mergePosterior | R Documentation |
Join two or more independent MCMC chains from the same data and phylogenetic trees by appending them together into a single chain.
mergePosterior(...)
... |
any number of posterior distributions as produced by the function 'readMCMC'. |
A merged posterior distribution in the same format.
Daniel S. Caetano and Luke J. Harmon
data( centrarchidae ) ## Run multiple MCMC chains. handle.list <- lapply(1:4, function(x) ratematrixMCMC(data=centrarchidae$data , phy=centrarchidae$phy.map, gen=10000, dir=tempdir()) ) ## Read all to a list posterior.list <- lapply(handle.list, readMCMC) ## Merge all posteriors in the list. merged.four <- mergePosterior(posterior.list) ## Merge some of the posteriors. merged.two <- mergePosterior(posterior.list[[1]], posterior.list[[3]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.