« Using R in the Human Resources department | Main | The tools in an R package developer's toolbox »

November 28, 2012

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010534b1db25970b017ee5b803e6970d

Listed below are links to weblogs that reference Hadley's guide to high-performance R with Rcpp:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Thanks for the heads up. Hadley's devtools tutorial was great as well.

I will love this recent influx of rcpp stuff and i will certainly use it to get started. I have one question though: What are the situations in which I can expect the most benefits from a c++ implementations?

couldn't get Rcpp's cppFunction to work. I downloaded the latest Revolution R on Windows 7 (Community 6.0, R version 2.14.2 (2012-02-29)), and I get

> library(Rcpp)
>
> cppFunction('
+ + NumericVector myRcpptest () {
+ + NumericVector out(3);
+ + for(int i = 0; i < 3; ++i) {
+ + out[i] = 0.0 + i;
+ + }
+ + return out;
+ + }
+ + ')
Error: could not find function "cppFunction"

Works OK on open-source R. Tried 32- and 64-bit versions of Revolution R. I'm wondering if I need dev tools or need to tell it where to find the compiler.

Would like to write a critical section in C++ and then also use doParallel to leverage multiple cores.

@druce
Are you sure you have the most recent Rcpp installed? devtools isn't required -- that's purely an R message.

@greg
Thank you, your code helped me.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


R for the Enterprise

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid

Search Revolutions Blog