presence.absence.matrix: Generate presence/absence matrix from simulated data

Description Usage Arguments Value Examples

View source: R/range.calculations.intervals.R

Description

Generate presence/absence matrix from simulated data

Usage

1
presence.absence.matrix(fossils, intervals, add.extant = TRUE)

Arguments

fossils

Fossil dataframe.

intervals

Intervals dataframe.

Value

Dataframe recording presences & absences during different time intervals.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(123)
# simulate tree
t = TreeSim::sim.bd.taxa(100,1,0.01,0.005)[[1]]

# simulate species
sp = FossilSim::sim.taxonomy(t)

# simulate fossils
f = FossilSim::sim.fossils.poisson(1, taxonomy = sp)
f = FossilSim::sim.extant.samples(f, taxonomy = sp)

# generate presence.absence matrix
presence.absence.matrix(f, stages)

rachelwarnock/fbdR documentation built on Aug. 23, 2019, 3:39 a.m.