Extending R with C++ and Fortran
A recent social-media question by James Curran inquired about the best, or recommended ways, to extend R with Fortran code. Part of the question was whether the .Fortran() interface was...continue reading.
A recent social-media question by James Curran inquired about the best, or recommended ways, to extend R with Fortran code. Part of the question was whether the .Fortran() interface was...continue reading.
Rcpp is all about the need for speed. However, Rcpp code is not magically fast, but is the result of careful coding and profiling. RcppClock makes it easy to profile...continue reading.
Simulation smoothing involves drawing latent state variables in discrete-time state–space models from their conditional distribution given parameters and data as defined by McCausland, Miller, & Pelletier (2011). This tool greatly...continue reading.
Introduction It is no secret that sparse matrix operations are faster in C++ than in R. RcppArmadillo and RcppEigen do a great job copying sparse matrices from R to C++...continue reading.
Introduction Character encodings can be tricky and frustrating to deal with. Several newer languages such as Go or Julia default to native UTF-8 on all platforms, greatly facilitating and easing...continue reading.
Introduction GNU Guile is a programming language “designed to help programmers create flexible applications that can be extended by users or other programmers with plug-ins, modules, or scripts”. It is...continue reading.
Introduction When we are using R6 objects and want to introduce some C++ code in our project, we may also want to interact with these objects using Rcpp. With this...continue reading.
Introduction With Rcpp attributes Rcpp modules (described in the Rcpp vignettes) it is easy to expose C++ classes and functions to R. This note describes how to use classes exported...continue reading.
Sometimes one needs to mimic the exact behavior of R’s Distributions within C++ code. The incredible Rcpp team has provided access to these distributions through Rmath.h (in the R:: namespace),...continue reading.
Introduction Often we need to have optional arguments in R of Rcpp functions with default values. Sometimes, the default value for the optional parameters is set to be NULL. Rcpp...continue reading.
Introduction Rcpp provides the DataFrame class which enables us to pass data.frame object between C++ and R. DataFrame objects are key to R and used very widely. They also provide...continue reading.
Introduction Roxygen2 is a convenient way to document functions in R packages. Based on the Doxygen model, it parses relevant information from the comments and generates the corresponding man/*.Rd files....continue reading.
This article demonstrates using the RcppParallel package to aggregate to an output vector. It extends directly from previous demonstrations of single-valued aggregation, through providing necessary details to enable aggregation to...continue reading.
Introduction Besides outstanding support for dense matrices, the Armadillo library also provides a great way to manipulate sparse matrices in C++. However, the performance characteristics of dealing with sparse matrices...continue reading.
Introduction Rcpp has an elegant mechanism of exception handling whereby C++ exceptions are automatically translated to errors in R. For most projects, the Rcpp::stop wrapper (in conjunction with the BEGIN_RCPP...continue reading.
The RcppArrayFire package provides an interface from R to and from the ArrayFire library, an open source library that can make use of GPUs and other hardware accelerators via CUDA...continue reading.
In the quest for ever faster code, one generally begins exploring ways to integrate C++ with R using Rcpp. This post provides an example of multiple implementations of a European...continue reading.
In the quest for ever faster code, one generally begins exploring ways to integrate C++ with R using Rcpp. This post provides an example of multiple implementations of a European...continue reading.
RcppProgress is a tool to help you monitor the execution time of your C++ code, by providing a way to interrupt the execution inside the C++ code, and also to...continue reading.
RcppProgress is a tool to help you monitor the execution time of your C++ code, by providing a way to interrupt the execution inside the C++ code, and also to...continue reading.