Rcpp
Projects
Rcpp
RInside
RcppArmadillo
RcppGSL
RcppExamples
RcppSMC
Gallery
Book
More
Dirk's Rcpp page
Rcpp at CRAN
Rcpp at GitHub
Rcpp at R-Forge
Rcpp-Devel list at Gmane
StackOverflow on Rcpp
Rcpp Gallery
Articles and code examples for the
Rcpp
package
basics
dataframe
matrix
stl
armadillo
rmath
modeling
sugar
gsl
recursion
function
benchmark
rng
sparse
vector
environment
string
c++11
eigen
xts
boost
factor
bigmemory
interrupt
openmp
python
parallel
simulation
serialization
simd
finance
cube
c++14
c++17
machine_learning
mlpack
macros
data.table
nanotime
integer64
modules
gpu
nullable
r6
Featured Articles
Using Rcpp with C++11, C++14 and C++17
— Dirk Eddelbuettel
Rcpp supports any C++ variant: from C++98 to C++11, C++14 and now C++17
Parsing Dates and Times
— Dirk Eddelbuettel
We demonstrate a new utility function built around the Boost Date_Time parsing functions.
Sampling Importance Resampling (SIR) and social revolution.
— Jonathan Olmsted
We use SIR to characterize the posterior distribution of parameters associated with the probability of social revolution.
Implementing an EM Algorithm for Probit Regressions
— Jonathan Olmsted
We illustrate the development process of creating code to estimate the parameters of a Probit regression model using the EM algorithm sequentially and in parallel.
Parallel Distance Matrix Calculation with RcppParallel
— JJ Allaire and Jim Bullard
Demonstrates computing an n x n distance matrix from an n x p data matrix.
Summing a Vector in Parallel with RcppParallel
— JJ Allaire
Demonstrates computing the sum of a vector in parallel using the RcppParallel package.
Transforming a Matrix in Parallel using RcppParallel
— JJ Allaire
Demonstrates transforming a matrix in parallel using the RcppParallel package.
Call Python from R through Rcpp
— Wush Wu
Integrate Python into R via Rcpp and Boost.Python
Faster Multivariate Normal densities with RcppArmadillo and OpenMP
— Nino Hardt, Dicko Ahmadou, Benjamin Christoffersen
Fast implementation of Multivariate Normal density using RcppArmadillo and OpenMP.
Quick conversion of a list of lists into a data frame
— John Merrill
This post shows one method for creating a data frame quickly
Passing user-supplied C++ functions
— Dirk Eddelbuettel
This example shows how to select user-supplied C++ functions
Using Rcpp to access the C API of xts
— Dirk Eddelbuettel
This post shows how to use the exported API functions of xts
Timing normal RNGs
— Dirk Eddelbuettel
This post compares drawing N(0,1) vectors from R, Boost and C++11
A first lambda function with C++11 and Rcpp
— Dirk Eddelbuettel
This post shows how to play with lambda functions in C++11
First steps in using C++11 with Rcpp
— Dirk Eddelbuettel
This post shows how to experiment with C++11 features
Using Rcout for output synchronised with R
— Dirk Eddelbuettel
This post shows how to use Rcout (and Rcerr) for output
Using the Rcpp sugar function clamp
— Dirk Eddelbuettel
This post illustrates the sugar function clamp
Using the Rcpp Timer
— Dirk Eddelbuettel
This post shows how to use the Timer class in Rcpp
Calling R Functions from C++
— Dirk Eddelbuettel
This post discusses calling R functions from C++
Armadillo eigenvalues
— Dirk Eddelbuettel
This example shows how to compute eigenvalues easily
More »
Published Articles
Jul 31, 2020
»
Handling R6 objects in C++
— David Quesada
Jun 8, 2020
»
Mixing Rcpp modules and Rcpp attributes
— Bob Jansen
Jun 6, 2020
»
Recreating rmultinom and rpois with Rcpp
— Joshua French
May 18, 2020
»
Nullable Optional Arguments in Rcpp functions
— Satyaprakash Nayak
May 5, 2020
»
Creating a data.table from C++
— David Zimmermann, Leonardo Silvestri, Dirk Eddelbuettel
Jan 2, 2020
»
Documenting Rcpp functions and classes in R packages
— Artem Sokolov and Dirk Eddelbuettel
Nov 5, 2019
»
Using RcppParallel to aggregate to a vector
— Mark Padgham
Apr 18, 2018
»
Performance considerations with sparse matrices in Armadillo
— Hong Ooi
Mar 27, 2018
»
Suppressing Call Stack Info in Rcpp-Generated Errors and Warnings
— Michael Weylandt
Mar 7, 2018
»
Introducing RcppArrayFire
— Ralf Stubner
Feb 28, 2018
»
Using RcppArmadillo to price European Put Options
— Davis Vaughan and Dirk Eddelbuettel
Dec 28, 2017
»
Custom progress bars for RcppProgress
— Clemens Schmid and Karl Forner
Dec 19, 2017
»
Define a custom print method for exposed C++ classes
— Daniel Schalk
Nov 11, 2017
»
Creating integer64 and nanotime vectors in C++
— Dirk Eddelbuettel
Aug 4, 2017
»
Passing user-supplied C++ functions with RcppXPtrUtils
— Iñaki Ucar
Jul 26, 2017
»
Cleaner Generic Functions with RCPP_RETURN Macros
— Nathan Russell
Feb 20, 2017
»
RcppMLPACK2 and the MLPACK Machine Learning Library
— Dirk Eddelbuettel
Feb 19, 2017
»
Using Rcpp with C++11, C++14 and C++17
— Dirk Eddelbuettel
Feb 18, 2017
»
Using Armadillo with SuperLU
— Qiang Kou and Dirk Eddelbuettel
Jul 26, 2016
»
RcppHoney Introduction
— Daniel C. Dillon
Jun 25, 2016
»
Introducing Rcpp::algorithm
— Daniel C. Dillon
Jun 25, 2016
»
Custom Templated as and wrap Functions within Rcpp.
— James Joseph Balamuta
Jun 23, 2016
»
Working with Rcpp::StringVector
— Brian J. Knaus
Jun 8, 2016
»
Optimizing Code vs Recognizing Patterns with 3D Arrays
— James Joseph Balamuta
May 27, 2016
»
Hierarchical Risk Parity Implementation in Rcpp and OpenMP
— Rafael Nicolas Fermin Cota, Yi King, and Chris Chung
May 26, 2016
»
Gerber Statistic Implementation in Rcpp and OpenMP
— Rafael Nicolas Fermin Cota, Yi King, and Chris Chung
Feb 2, 2016
»
SIMD Map-Reduction with RcppNT2
— Kevin Ushey
Feb 1, 2016
»
Using RcppNT2 to Compute the Variance
— Kevin Ushey
Feb 1, 2016
»
Using RcppNT2 to Compute the Sum
— Kevin Ushey
Feb 1, 2016
»
Introduction to RcppNT2
— Kevin Ushey
Jan 24, 2016
»
Writing fast asynchronous SGD/AdaGrad with RcppParallel
— Dmitriy Selivanov
Nov 7, 2015
»
Serialize and Deserialize a C++ Object in Rcpp
— Wush Wu
Apr 25, 2015
»
Stochastic SIR Epidemiological Compartment Model
— Christian Gunning
Apr 2, 2015
»
Call matplotlib from R
— Matti Pastell
Mar 22, 2015
»
Parsing Dates and Times
— Dirk Eddelbuettel
Dec 27, 2014
»
Create an R-tree data structure using Rcpp and Boost::Geometry
— Nagi Teramo and Dirk Eddelbuettel
Oct 23, 2014
»
Sampling Importance Resampling (SIR) and social revolution.
— Jonathan Olmsted
Oct 1, 2014
»
Implementing an EM Algorithm for Probit Regressions
— Jonathan Olmsted
Jul 25, 2014
»
Using RcppArmadillo with bigmemory
— Scott Ritchie
Jul 15, 2014
»
Computing an Inner Product with RcppParallel
— JJ Allaire
Jul 15, 2014
»
Parallel Distance Matrix Calculation with RcppParallel
— JJ Allaire and Jim Bullard
Jun 29, 2014
»
Summing a Vector in Parallel with RcppParallel
— JJ Allaire
Jun 29, 2014
»
Transforming a Matrix in Parallel using RcppParallel
— JJ Allaire
Jun 24, 2014
»
Speed Chain Ladder Analysis with Rcpp
— Chibisi Chima-Okereke
Apr 6, 2014
»
Call Python from R through Rcpp
— Wush Wu
Apr 1, 2014
»
Using iterators for sparse vectors and matrices
— Søren Højsgaard and Doug Bates
Mar 21, 2014
»
A simple array class with specialized linear algebra routines
— Fabian Scheipl
Mar 20, 2014
»
Dynamic dispatch for sparse matrices
— Fabian Scheipl
Mar 16, 2014
»
Vector Subsetting in Rcpp
— Kevin Ushey
Mar 14, 2014
»
Condorcet Voting with Rcpp
— Avraham Adler
Feb 23, 2014
»
Convex Hull of Polygon using Boost.Geometry
— Sameer D'Costa
Jan 4, 2014
»
Detecting a Time Series Change Point
— Joshua French
Dec 9, 2013
»
Performance of the divide-and-conquer SVD algorithm
— Dirk Eddelbuettel
Dec 2, 2013
»
Converting C code to C++ code: An example from plyr
— Hadley Wickham and Dirk Eddelbuettel
Sep 24, 2013
»
Munkres' Assignment Algorithm with RcppArmadillo
— Lars Simon Zehnder
Sep 12, 2013
»
Getting indices of top elements from a vector using a priority queue
— Romain Francois and Martin Morgan
Sep 9, 2013
»
First Derivative of the Multivariate Normal Densities with RcppArmadillo
— Joscha Legewie
Aug 5, 2013
»
Creating as and wrap for sparse matrices
— Dirk Eddelbuettel and Binxiang Ni
Aug 3, 2013
»
Gibbs Sampler in C++
— Dirk Eddelbuettel
Jul 13, 2013
»
Faster Multivariate Normal densities with RcppArmadillo and OpenMP
— Nino Hardt, Dicko Ahmadou, Benjamin Christoffersen
Jun 10, 2013
»
Sobol Sensitivity Analysis
— Robin Girard
May 16, 2013
»
Using RcppProgress to control the long computations in C++
— Karl Forner
May 8, 2013
»
An accept-reject sampler using RcppArmadillo::sample()
— Jonathan Olmsted
Apr 12, 2013
»
Using the RcppArmadillo-based Implementation of R's sample()
— Christian Gunning and Jonathan Olmsted
Apr 8, 2013
»
Dynamic Wrapping and Recursion with Rcpp
— Kevin Ushey
Mar 14, 2013
»
Using bigmemory with Rcpp
— Michael Kane and Scott Ritchie
Mar 12, 2013
»
Generating a multivariate gaussian distribution using RcppArmadillo
— Ahmadou Dicko
Mar 1, 2013
»
Using Rcpp with Boost.Regex for regular expression
— Dirk Eddelbuettel
Feb 27, 2013
»
Fast factor generation with Rcpp
— Kevin Ushey
Jan 31, 2013
»
Using Boost via the new BH package
— Dirk Eddelbuettel
Jan 31, 2013
»
Sorting Numeric Vectors in C++ and R
— Ross Bennett
Jan 30, 2013
»
Using Boost's foreach macro
— Kevin Ushey
Jan 22, 2013
»
Quick conversion of a list of lists into a data frame
— John Merrill
Jan 21, 2013
»
Passing user-supplied C++ functions
— Dirk Eddelbuettel
Jan 20, 2013
»
Coercion of matrix to sparse matrix (dgCMatrix) and maintaining dimnames.
— Søren Højsgaard