This package providesR withaccess toBoost header files.Boost provides free peer-reviewedportable C++ source libraries. A large part ofBoost is provided as C++ template codewhich is resolved entirely at compile-time without linking.
This package aims to provide the most useful subset ofBoost libraries for template use amongCRAN packages. By placing these libraries in this package, we offer amore efficient distribution system for CRAN as replication of this codein the sources of other packages is avoided.
It can be used via theLinkingTo: field in theDESCRIPTION field of an R package — and the R packageinfrastructure tools will then know how to set include flags correctlyon all architectures supported by R.
Note that this can be used solely by headers-only Boost libraries.This covers most of Boost, but excludes some libraries which requirelinking for parts or all of their functionality.
As of release 1.72.0-3, the following Boost libraries areincluded:
accumulators algorithm align any atomic bimap bind circular_buffercompute concept config container date_time detail dynamic_bitsetexception flyweight foreach functional fusion geometry graph heap iclinteger interprocess intrusive io iostreams iterator math move mp11 mplmultiprecision numeric pending phoenix polygon preprocessor propery_treerandom range scope_exit smart_ptr sort spirit tuple type_traits typeofunordered utility uuid
TheRcpp Gallery containsseveral examples underitsboost tag including the introductoryfirstandsecond.From thefirst,a simple example to compute the greatest common demoninator of twointegers follows:
// [[Rcpp::depends(BH)]]#include<Rcpp.h>#include<boost/math/common_factor.hpp>// [[Rcpp::export]]int computeGCD(int a,int b){returnboost::math::gcd(a, b);}Saving it asboostExample.cpp and simple sourcing thisRcpp::sourceCpp("boostExample.cpp") produces the functioncomputeGCD(). See theRcpp Gallery for more examples.
Themailinglist atR-Forge is agood place for questions, comments and general discussion. Theissue tracker canbe used for bugs.
We aim to maintain this package in a somewhat conservative fashionand do not always immediately jump the newest Boost releases. Rather, we(used to) start from theDebian sourcesfor Boost to ensure that we work with a version that is at the sametime current yet mature. But on occassion, and as needed, and morerecently, we will also go directly to Boost releases.
In general, we plan to keep the package up-to-date withBoost upstream, but will notnecessarily follow each and every new release as we also value themerits of relative release stability.
If needed, the scriptlocal/script/CreateBoost.sh can beused to update a forked version to a newer version ofBoost.
That used to be a concern, and we wrote:
The repo has a large footprint. We know. We erroneously thought thatcommitting the Boost tarballs would be a good idea. It wasn’t. Firstattempts at pruning the historyusing bfg were notthat successful. If someone has a script doing this well we would takeanother look.
Otherwise we recommend to just start fromCreateBoost.sh.
and lo and behold, we got help viathisscript asdiscussed here.The old tarballs are now removed; six commits were filtered and the repohas a much saner nice so it can be forked more easily.
Dirk Eddelbuettel, Jay Emerson and Michael Kane
This package is provided under the same license as Boost itself, theBSL-1.0
Initially created: Sat Apr 13 16:42:12 CST 2014
Last modified: Sun May 26 09:57:44 CDT 2024