Description Usage Arguments Value Author(s) See Also Examples

Return speciation, extinction, net diversification, or
Brownian motion trait rates for all species in the phylogeny from
`BAMM`

output.

1 | ```
getTipRates(ephy, returnNetDiv = FALSE, statistic = "mean")
``` |

`ephy` |
An object of class |

`returnNetDiv` |
Logical. If |

`statistic` |
Determines how the average tip rates should be
calculated. Can be either |

Returns a list with the following elements:

If `ephy`

type is 'diversification':

lambda A matrix of tip speciation rates with species as rows, and posterior samples as columns.

mu A matrix of tip extinction rates with species as rows, and posterior samples as columns.

lambda.avg A vector of average tip speciation rates, averaged with mean or median, depending on selected option for

`statistic`

. The vector is named with species names.mu.avg A vector of average tip extinction rates, averaged with mean or median, depending on selected option for

`statistic`

. The vector is named with species names.

If `ephy`

type is 'diversification' and
`returnNetDiv = TRUE`

:

netdiv A matrix of tip net diversification rates with species as rows, and posterior samples as columns.

netdiv.avg A vector of average tip net diversification rates, averaged with mean or median, depending on selected option for

`statistic`

. The vector is named with species names.

If `ephy`

type is 'trait':

beta A matrix of tip phenotypic rates with species as rows, and posterior samples as columns.

beta.avg A vector of average tip phenotypic rates, averaged with mean or median, depending on selected option for

`statistic`

. The vector is named with species names.

Pascal Title

Requires an object of class `bammdata`

as obtained with
`getEventData`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
data(whales, events.whales)
ephy <- getEventData(whales, events.whales, burnin=0.25, nsamples = 500)
# return a vector of average species-specific speciation rates.
meanlam <- getTipRates(ephy, returnNetDiv = FALSE,
statistic = 'mean')$lambda.avg
meanlam
# return a vector of median species-specific net diversification rates.
ndr <- getTipRates(ephy, returnNetDiv = TRUE,
statistic = 'median')$netdiv.avg
# Return mean species-specific speciation rates from all posterior
# samples in the \code{bamm-data} object.
lam <- getTipRates(ephy, returnNetDiv = FALSE, statistic = 'mean')$lambda
rowMeans(lam)
``` |

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.