read_Simmap_Rev {ontophylo}R Documentation

Reading stochastic character maps file from ReVBayes

Description

Imports stochastic character maps file from RevBayes into R.

Usage

read_Simmap_Rev(file, start = 1, end = 1, save = NULL)

Arguments

file

character. Path to the RevBayes file.

start

integer. First tree of the sample to start reading the RevBayes file.

end

integer. Last tree of the sample to finish reading the RevBayes file.

save

character. Name to save output file.

Value

A tree in 'phylip' format.

Author(s)

Sergei Tarasov

Examples

rev_stm <- "Iteration\t1\t2\t3\tsimmap\n
0\t{1,2.0}\t((spp1:{1,4.0:0,4.0},spp2:{1,2.0:0,6.0}):{1,0.5});\n
1\t{1,2.0}\t((spp1:{1,2.0:0,6.0},spp2:{1,3.0:0,5.0}):{1,0.5});\n
3\t{1,2.0}\t((spp1:{1,2.0:0,6.0},spp2:{1,3.0:0,5.0}):{1,0.5});"
stm <- read_Simmap_Rev(textConnection(rev_stm, "r"), start = 0, end = 3, save = NULL)
stm <- phytools::read.simmap(text = stm, format = "phylip")
phytools::plotSimmap(stm[[1]])


[Package ontophylo version 1.1.3 Index]