sim_mainland: Simulates mainland extinction as a species-level moran...

View source: R/sim_mainland.R

sim_mainlandR Documentation

Simulates mainland extinction as a species-level moran process with species extinction immediately replaced via the speciation of an exisiting mainland species.

Description

Simulates mainland extinction as a species-level moran process with species extinction immediately replaced via the speciation of an exisiting mainland species.

Usage

sim_mainland(total_time, m, mainland_ex)

Arguments

total_time

Numeric defining the length of the simulation in time units.

m

Numeric defining the size of mainland pool.

mainland_ex

Numeric parameter for mainland extinction rate.

Value

a list where each element is a mainland clade. Each element of the list is a data frame with nine columns. The columns contain:

  1. Species identity (spec_id)

  2. Mainland ancestor identity (main_anc_id)

  3. Species type (spec_type)

  4. Branching code (branch_code)

  5. Branching time (forwards in time from the start of the simulation) (branch_t)

  6. Species origination time (spec_origin_t)

  7. Species extinction time (spec_ex_t)

Author(s)

Joshua W. Lambert

Examples

## Simulate mainland for 1 million years with a size of 100 species and a
## mainland extinction rate of 1 (SpMy^-1).

set.seed(
  1,
  kind = "Mersenne-Twister",
  normal.kind = "Inversion",
  sample.kind = "Rejection"
)
mainland <- sim_mainland(
  total_time = 1,
  m = 100,
  mainland_ex = 1
)

joshwlambert/DAISIEmainland documentation built on July 14, 2024, 5:40 p.m.