Description Usage Arguments Value Examples

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

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.

1 2 3 4 5 6 7 8 9 10 11 |

`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. |

An object of class fossils.

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.