TreeWalkerDiscrete: Generate random birth-death tree with associated coordinates

Description Usage Arguments Details Value Author(s) Examples

Description

This function generates a birth-death tree in discrete time steps at the same time as recording the long lat of each brach at the end of each step

Usage

1
2
3
4
5
6
7
8
9
TreeWalkerDiscrete(
  b = 0.1,
  d = 0.05,
  steps = 50,
  slon = 0,
  slat = 0,
  steplengthsd = 100,
  EarthRad = 6367.4447
)

Arguments

b

per-lineage birth (speciation) rate

d

per-lineage death (extinction) rate

steps

number of time steps to use

slon

starting longitude

slat

starting latitude

steplengthsd

standard deviation used for random walk draws

EarthRad

Earth radius in kilometres.

Details

This function is based on the function sim.bdtree in geiger <http://cran.r-project.org/web/packages/geiger/geiger.pdf>.

Value

tree a phylogenetic tree

longitudes a matrix with rows corresponding to the tree edges and colunns to time step

latitudes a matrix with rows corresponding to the tree edges and colunns to time step

Author(s)

Laura C. Soul lauracsoul@gmail.com

Examples

1
TreeWalkerDiscrete(b=0.1, d=0.05, steps=50, slon=0, slat=0, steplengthsd = 100)

laurasoul/dispeRse documentation built on May 25, 2021, 4:50 a.m.