ivy.r_funcs module

Functions that interface with r using rpy2

ivy.r_funcs.phylorate(eventfile, treefile, spex)[source]

Use BAMMtools to get rate data for characters or speciation/extinction rates along the branches of tree

(http://bamm-project.org/introduction.html)

Parameters:
  • eventfile (str) – Path to event data output from BAMM
  • treefile (str) – Path to tree
  • spex (str) – “s”, “e”, or “netdiv”. Whether to get speciation, extinction, or net diversification rates.
Returns:

Tuple of rates and node indices associated with the rates