first.last.appearances.pa: Work out first and last appearance intervals

Description Usage Arguments Value Examples

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

Description

Work out first and last appearance intervals

Usage

1
first.last.appearances.pa(presence.absence)

Arguments

presence.absence

Dataframe of presence/absence data. Each row represents a taxon and each column represents a time interval from oldest to youngest.

Value

Dataframe containing first and last appearance intervals. Intervals are numbered oldest (= 1) to youngest (> 1).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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
pa = presence.absence.matrix(f, stages)

# work out first and last appearance intervals
fa = first.last.appearances.pa(pa)

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