Learn R Programming

CRABS (version 1.2.0)

model2df: model2df

Description

model2df

Usage

model2df(model, gather = TRUE, rho = 1, compute.pulled.rates = TRUE)

Value

a data frame

Arguments

model

an object of class "CRABS"

gather

boolean. Whether to return wide or long data frame

rho

the sampling fraction at the present. Used to calculate the pulled speciation rate

compute.pulled.rates

whether to compute the pulled rates

Examples

Run this code
lambda <- function(t) 2.0 + sin(0.8*t)
mu <- function(t) 1.5 + exp(0.15*t)
times <- seq(from = 0, to = 4, length.out = 1000)
model <- create.model( lambda, mu, times = times)

model2df(model)

Run the code above in your browser using DataLab