This vignette shows how to parse a BEAST2 posterior file using rBEAST
.
Load the rBEAST
package:
library(rBEAST)
Check if the example file can be found:
trees_file <- "example.trees" testit::assert(file.exists(trees_file))
Parse the posterior:
posterior <- beast2out.read.trees(trees_file)
Investigating the posterior:
names(posterior) testit::assert(length(posterior) == 10)
We can see that the posterior has multiple states.
Every state is a phylogeny:
testit::assert(class(posterior[[1]]) == "phylo")
We can plot these:
for (p in posterior) { plot(p) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.