Description Usage Arguments Value See Also Examples

Fossils can be simulated for a phylo (`tree`

) or taxonomy (`taxonomy`

) object.
If both are specified, the function uses taxonomy.
If no taxonomic information is provided, the function assumes all speciation is symmetric (i.e. bifurcating, `beta = 1`

).
A vector of rates can be specified to allow for rate variation across lineages.
If a vector is provided, each entry will apply to each unique species in the order in which they appear in the taxonomy object (if taxonomy is provided),
or to each unique edge in the order in which they appear in the tree object.
If the tree object has a root edge (`root.edge`

), the first entry in the rates vector should correspond to this edge.

1 2 3 4 5 6 7 8 |

`rate` |
A single Poisson sampling rate or a vector of rates. |

`tree` |
Phylo object. |

`taxonomy` |
Taxonomy object. |

`fossils` |
Append fossils to to an existing fossils object. |

`ignore.taxonomy` |
Ignore species taxonomy (returns sp = NA). Default = FALSE. |

`root.edge` |
If TRUE include the root edge. Default = TRUE. |

An object of class fossils.

`sim.fossils.intervals`

, `sim.fossils.environment`

, `sim.trait.values`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
# simulate tree
t = ape::rtree(6)
# simulate fossils using the tree
rate = 2
f = sim.fossils.poisson(rate, tree = t)
plot(f, t)
# simulate fossils using taxonomy
s = sim.taxonomy(t, 0.5, 1, 0.5)
f = sim.fossils.poisson(rate, taxonomy = s)
plot(f, t)
# simulate fossils with autocorrelated rate variation across lineages
rates = sim.trait.values(init = rate, taxonomy = s, v = 1)
f = sim.fossils.poisson(rates, taxonomy = s)
plot(f, t)
# append fossils to an existing fossils object
rate = 1
f1 = sim.fossils.poisson(rate, tree = t)
plot(f1, t)
rate = 2
f2 = sim.fossils.poisson(rate, tree = t, fossils = f1)
plot(f2, t)
f3 = sim.fossils.poisson(rate, tree = t, fossils = f2, ignore.taxonomy = TRUE)
plot(f3, t, show.unknown = TRUE)
``` |

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.