I've been playing with parallelising Rcpp11 implementation of sugar. For example, we have a NumericVector variable x and we want to compute e.g. sqrt(exp(x)) + 2.0. With sugar, we can do: NumericVector y = sqrt(exp(x)) + 2.0 ; and this does not...

We are getting close to useR!2014. I hope I'll see some of you at my tutorial about Rcpp11 in the morning. There are some other pretty useful tutorials as well, so no hard feeling if you don't come, but if you do want to know about modern R and C++, pl...

Under the impulsion of @kevin_ushey who already did something similar for Rcpp, we've been adding subsetting behavior into Rcpp11. The idea is given a vector y and a vector x we want to give meaning to y. The first legitimate question is what kind of x do we want to allow. This has been discussed since...

Motivation In R, we can pass further arguments to sapply. The arguments are then passed the function to be applied over. x <- seq(-3, 3, by=.2 ) sapply( x, dnorm, 0, 4, FALSE ) Conceptually this does something like: sapply( x, function(.){ ...

I pushed some code this morning to allow us to use this alternative syntax to use Rcpp11. #include <Rcpp11> using namespace Rcpp11 ; Of course the usual code will continue to work, and might even be preferable if you write code that needs to...

I'm in the process of modernizing the implementation of sugar in Rcpp11. Previous work already improved performance of sugar by allowing sugar classes themselves to implement how to apply themselves into their target vector. For example the sugar class SeqLen leverages std::iota instead of a manual for loop. template <typename Target> inline...

This gist from @hadley has been on my mind for some time. This was already a follow up of this post from @johnmyleswhite. The problem was that sugar vectorised code suffered a performance penalty compared to devectorised code. This is particularly troubling me because the whole point of sugar is to have nice syntax without...