m_scatterplot: Plot diversification rates estimated by a MuHiSSE model with...

Description Usage Arguments Value Examples

View source: R/utilhisse.R

Description

A function to plot a jittered scatterplot of (model-averaged) diversification rates and summary statistics in the alternative states.

Usage

1
2
3
4
5
6
7
m_scatterplot(
  processed_recon,
  states_names = c("00", "01", "10", "11"),
  parameter = "turnover",
  colors = viridis(n = 4, option = 2, end = 0.7),
  plot_as_waiting_time = FALSE
)

Arguments

processed_recon

An object produced by m_process_recon

states_names

Translation for the character states in the order 00, 01, 10, 11 (if wanted)

parameter

The diversification parameter to be plotted on the y axis. Possible options are turnover, extinct.frac, net.div, speciation, extinction

colors

Colors for the lines and points

plot_as_waiting_time

Whether to plot the rates (FALSE, default) or their inverse (waiting times)

Value

A jittered scatterplot of tip-associated rates (possibly model averaged) with summary statistics (mean +/- sd)

Examples

1
2
3
4
5
6
7
data("diatoms")
processed_muhisse <- m_process_recon(muhisse_recon=diatoms$muhisse_recon)

m_scatterplot(
 processed_recon = processed_muhisse,
 parameter = "extinction",
 colors = c("#000004FF", "#57157EFF", "#C43C75FF", "#FE9F6DFF"))

teofiln/utilhisse documentation built on Sept. 3, 2020, 2:55 p.m.