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

November 28, 2012

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.

The comments to this entry are closed.

Search Revolutions Blog




Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr