sim.interval.ages: Reassign fossil ages to user-specified stratigraphic...

Description Usage Arguments Value Examples

View source: R/sim.interval.ages.R

Description

Reassign exact fossil ages using the minimum and maximum ages of a set of stratigraphic intervals. If use.species.ages = TRUE the function will respect species durations and will not return minimum and maximum bounds that may be younger or older than the species durations. This requires supplying a phylo or taxonomy object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sim.interval.ages(
  fossils,
  tree = NULL,
  taxonomy = NULL,
  interval.ages = NULL,
  max.age = NULL,
  strata = NULL,
  use.species.ages = FALSE,
  root.edge = TRUE,
  sim.extant = FALSE
)

Arguments

fossils

Fossil object.

tree

Phylo object.

taxonomy

Taxonomy object.

interval.ages

Vector of stratigraphic interval ages, starting with the minimum age of the youngest interval and ending with the maximum age of the oldest interval.

max.age

Maximum age of the oldest stratigraphic interval.

strata

Number of stratigraphic intervals.

use.species.ages

If TRUE reassigned fossil ages will respect the speciation times. Default = FALSE.

root.edge

If TRUE include root edge.

sim.extant

If TRUE simulate age uncertainty for extant samples as well, default FALSE.

Value

An object of class fossils.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# simulate tree
t = ape::rtree(8)

# simulate fossils
rate = 2
f = sim.fossils.poisson(rate, t)
plot(f, t)

# assign a max age based on tree height
max.age = tree.max(t)

# define intervals
times = seq(0, max.age, length.out = 5)

# reassign ages
f = sim.interval.ages(f, t, interval.ages = times)

# plot output
plot(f, t, interval.ages = times)

FossilSim documentation built on April 6, 2021, 1:06 a.m.