The R packagerexpokit is a key dependency of theBioGeoBEARS R packagefor phylogenetic biogeography.
rexpokit wraps some of the matrix exponentiationutilities fromEXPOKIT, a Fortran 77library that is widely recommended for matrix exponentiation (Sidje RB,1998. “Expokit: A Software Package for Computing Matrix Exponentials.”ACM Trans. Math. Softw. 24(1): 130-156). EXPOKIT includesfunctions for exponentiating both small, dense matrices, and large,sparse matrices (in sparse matrices, most of the cells have value0).
Rapid matrix exponentiation is useful in phylogenetics when we have alarge number of states (as we do when we are inferring the history oftransitions between the possible geographic ranges of a species), but isprobably useful in other ways as well.
Installation
As rexpokit contains C++ and FORTRAN code, it is easiest to installthe pre-compiled binaries from CRAN. This is done from the R commandline, with:
install.packages("rexpokit")If you want to install the GitHub version, you will need gfortran andgcc compilers installed on your machine. Then, install usingdevtools:
library(devtools)install_github("nmatzke/rexpokit", INSTALL_opts="--byte-compile")To see examples of the matrix exponentiation calculations, see theexample code with:
library(rexpokit)?rexpokitBuild status on Travis-CI: (Deleted, as Travis-CInow requires subscription.)
NOTE: As of 2023-06-21, a new version ofrexpokit, 0.26.6.8, has been submitted to CRAN. Thisversion fixes some warnings caused bygfortan/gcc10. Binaries should be availablesoon. Old binaries have been archived at:https://github.com/nmatzke/Matzke_R_binaries
NOTE: As of 2019-11-04, a new version ofrexpokit, 0.26.6.6, has been accepted on CRAN. This versionfixes some warnings caused bygfortan/gcc10,currently in beta, but nonetheless checked by CRAN. Binaries should beavailable soon. Old binaries have been archived at:https://github.com/nmatzke/Matzke_R_binaries
NOTE: As of 2018-10-03, a new version of rexpokit,0.26.6, has been accepted on CRAN. This version fixes warnings due toupgrades in CRAN’s FORTRAN compilers, and more importantly, removes somedependencies previously needed by cladoRcpp/BioGeoBEARS. CRAN version ishere, binaries should be available in a few days:https://cran.r-project.org/package=rexpokit
Release v0.26.6 registered on Zenodo:
Zenodo link for release:https://zenodo.org/badge/latestdoi/17001945
Zenodo DOI for release:http://dx.doi.org/10.5281/zenodo.1442889