
Extract diversification data from a BAMM_object
Source:R/extract_diversification_data_melted_df_for_focal_time.R
extract_diversification_data_melted_df_for_focal_time.RdExtracts regimes ID and tip rates from a BAMM_object that have been
updated to provide diversification data for a specific time in the past (i.e. the focal_time).
Use update_rates_and_regimes_for_focal_time() to obtain
a BAMM_object updated for a given focal_time.
Arguments
- BAMM_object
Object of class
"bammdata", typically generated withupdate_rates_and_regimes_for_focal_time(), that contains a phylogenetic tree and associated diversification rate mapping across selected posterior samples.- verbose
Logical. Should progression be displayed? A message will be printed for every batch of 100 BAMM posterior samples extracted. Default is
TRUE.
Value
Returns a data.frame with six columns.
$focal_timeInteger. The time, in terms of time distance from the present, at which the trait data were extracted. Should be equal for all rows as a unique BAMM_object updated for a uniquefocal_timeis being extracted.$BAMM_sample_IDInteger. ID of the posterior samples from which the diversification data are extracted.$tip_IDCharacter string. Tip labels of the branches cut-off atfocal_time.If
keep_tip_labels = TRUEwas used inupdate_rates_and_regimes_for_focal_time(), cut-off branches with a single descendant tip retain their initialtip.label.If
keep_tip_labels = FALSEwas used inupdate_rates_and_regimes_for_focal_time(), all cut-off branches are labeled using their tipward node ID.
$regime_IDInteger. The regime ID on tips atfocal_time. IDs are integer. The root process equals "1", then they are incremented from oldest to youngest. Regime IDs are independent across posterior samples.$rate_typeCharacter string. Type of rates: "lambda" for speciation rates, "mu" for extinction rates, and "net_diversification" for net diversification rates (lambda - mu).$ratesNumerical. Rates in \[number of events / branch / evolutionary time\].