Skip to content
Back to formatted view

Raw Message

Message-ID: <BANLkTikCxv6hMH5x1V9u=SPFRjPoDp7YTQ@mail.gmail.com>
Date: 2011-06-24T05:19:32Z
From: Christian Gunning
Subject: [Rcpp-devel] Short blog post on loop speed in R
In-Reply-To: <BANLkTi=Fz52bWiYcYdthScKD+=qs7uH0dA@mail.gmail.com>

On Sun, Jun 19, 2011 at 11:20 AM, Douglas Bates <bates at stat.wisc.edu> wrote:
>
>
> As for the use of Rcpp, the STL containers and algorithms can be
> exploited to an even greater extent. ?If you are willing to jump
> through the hoops of defining a struct that inherits from
> std::binary_function then you can shorten the Rcpp-based code
> considerably.

Thanks for this, by the way.  I added it to the post (which got a
shout-out from David on the Revolutions blog), along with your
comments about apply().

Strictly speaking, it's 8 vs. 6 lines of code.  I guess "considerably
shorter" is in the eye of the beholder :).  It's a neat template
example, in any case.

-xian

-- 
A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal ? Panama!