This is a fast C++ backend for the PCMBase R-package.

Installation

The package needs a C++ 11 compiler and Rcpp to be installed in you R-environment. Once this is done, you can install the most recent version of the package from github:

devtools::install_github("venelin/PCMBaseCpp")

If you experience problems installing the package from github, you may try installing a possibly older version from CRAN:

install.packages("PCMBaseCpp")

Once the package is installed, use the function BenchmarkRvsCpp to evaluate the gain in speed of the likelihood calculation on your machine, relative to the R implementation:

For further examples, read the Getting started guide and the reference available on the package homepage.

Citing PCMBase

To give credit to the PCMBase package in a publication, please cite the following articles:

Mitov, V., & Stadler, T. (2018). Parallel likelihood calculation for phylogenetic comparative models: The SPLITT C++ library. Methods in Ecology and Evolution, 2041–210X.13136. http://doi.org/10.1111/2041-210X.13136

Mitov, V., Bartoszek, K., Asimomitis, G., & Stadler, T. (2019). Fast likelihood calculation for multivariate Gaussian phylogenetic models with shifts. Theor. Popul. Biol. https://doi.org/10.1016/j.tpb.2019.11.005

Used 3rd party libraries

The PCMBaseCpp R-package uses the following R-packages and C++ libraries:

  • For tree processing in C++: The SPLITT library (Mitov and Stadler 2018);
  • For data processing in R: data.table v1.12.8 (Dowle and Srinivasan 2019);
  • For algebraic manipulation: The Armadillo C++ template library (Sanderson and Curtin 2016) and its port to R RcppArmadillo v0.9.700.2.0 (Eddelbuettel et al. 2019);
  • For unit-testing: testthat v2.1.1 (Wickham 2019), covr v3.2.1 (Hester 2018);
  • For documentation and web-site generation: roxygen2 v6.1.1 (Wickham, Danenberg, and Eugster 2018), pkgdown v1.3.0 (Wickham and Hesselberth 2018);

References

Dowle, Matt, and Arun Srinivasan. 2019. Data.table: Extension of ‘Data.frame‘. https://CRAN.R-project.org/package=data.table.

Eddelbuettel, Dirk, Romain Francois, Doug Bates, and Binxiang Ni. 2019. RcppArmadillo: ’Rcpp’ Integration for the ’Armadillo’ Templated Linear Algebra Library. https://CRAN.R-project.org/package=RcppArmadillo.

Hester, Jim. 2018. Covr: Test Coverage for Packages. https://CRAN.R-project.org/package=covr.

Mitov, Venelin, and Tanja Stadler. 2018. “Parallel likelihood calculation for phylogenetic comparative models: The SPLITT C++ library.” Methods in Ecology and Evolution, December, 2041–210X.13136.

Sanderson, Conrad, and Ryan Curtin. 2016. “Armadillo: a template-based C++ library for linear algebra.” Journal of Open Source Software 1 (2).

Wickham, Hadley. 2019. Testthat: Unit Testing for R. https://CRAN.R-project.org/package=testthat.

Wickham, Hadley, Peter Danenberg, and Manuel Eugster. 2018. Roxygen2: In-Line Documentation for R. https://CRAN.R-project.org/package=roxygen2.

Wickham, Hadley, and Jay Hesselberth. 2018. Pkgdown: Make Static Html Documentation for a Package. https://CRAN.R-project.org/package=pkgdown.