plot_ttt: Plot trait dynamics through time

Description Usage Arguments Details Value Author(s) References See Also

View source: R/plot_ttt.R

Description

This function plots evolutionary dynamics of discrete traits as summarized using transitions_through_time. Two types of plots can be generated: the number of different states active through time (where identical states that have different origins are not counted as the same one), and the rates at which these states are originating (birth rate), becoming extinct (death rate), or accumulating (diversification rate) thorugh time. Depending on the character being investigated, these plots might or might not be meaningful.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_ttt(
  ttt,
  interval = NA,
  window_size = NA,
  CI = 80,
  trim = T,
  graphs = "both",
  rates = "diversification",
  k = NA
)

Arguments

ttt

Data.frame output by transitions_through_time.

interval

Numeric value that determines the temporal resolution (i.e., the step size in Ma at which the number of active regimes is recorded). Defaults to slightly less than 100 given the time spanned by the phylogeny.

window_size

Numeric value that sets the width of the window used to smoot rate estimates. Defaults to a width that includes approx. 10 intervals (see above).

CI

Numeric value that sets the confidence interval (expressed as percentage). Determines the amount of results that are discarded before plotting (default = 80).

trim

Whether to trim a few values at the begining and end of plot that contain fewer intervals and can be noisier. Default is TRUE.

graphs

Which graphs to plot. Options include 'active_regimes', 'rate_ttt', and 'both'.

rates

Which rates to plot. Options include any combination of 'birth', 'death', and 'diversification'. Defaults to only the latter.

k

The value of k used for gam regression. If not specified this is automatically determined (see more details in gam).

Details

By default, this is used by transitions_through_time to plot results. However, the object returned by that function can also be used here with more control on the plotting options. These include the intervals (in Ma) at which the number of states are recorded, the size of the window used to smooth rates, the type of plot generated, and the type of rate to plot (see Arguments).

Trends are depicted using GAM regressions (see gam). Depending on the combination of the size of the smoothing window and the number of smoothing functions used, nonsensical results can be obtained. Some tuning might be necessary to correctly depict trends in the data.

Value

A plot including different visual summaries of the evolutionary dynamics of discrete traits through time.

Author(s)

Nicolás Mongiardino Koch

References

Mongiardino Koch N. 2021. Exploring adaptive landscapes across deep time: A case study using echinoid body size. Evolution, https://doi.org/10.1111/evo.14219.

See Also

transitions_through_time


mongiardino/extendedSurface documentation built on July 6, 2021, 7:13 p.m.