Re: [Rcpp-devel] Where is compileCode() ?

2011-08-23 Thread Jonas Rauch
It's in the inline package in the file R/cfunction.R Jonas On Wed, Aug 24, 2011 at 6:49 AM, Darren Cook wrote: > Trying to understand some of the Rcpp/inline internals I was led to a > call to compileCode() [1]. This is called from both cxxfunction and > cfunction, but I cannot find it anywher

Re: [Rcpp-devel] Using C++0x in g++ changes ifelse behaviour

2011-08-23 Thread Darren Cook
> How to set g++ compiler flags using Rcpp and inline? > http://stackoverflow.com/q/7063265/841830 I've worked out, and added an answer to the above. In a nutshell, set settings$env$PKG_CXXFLAGS, where settings is the return of getPlugin("Rcpp"). (I set the answer as "community wiki", so othe

[Rcpp-devel] Where is compileCode() ?

2011-08-23 Thread Darren Cook
Trying to understand some of the Rcpp/inline internals I was led to a call to compileCode() [1]. This is called from both cxxfunction and cfunction, but I cannot find it anywhere. I downloaded the inline package source code (having already searched the Rcpp source code), and then as still no luck,

Re: [Rcpp-devel] Parameter Naming

2011-08-23 Thread Darren Cook
P.S. I think it was obvious from the context that this version contained a typo but, just in case anyone was confused, it should've looked like: nearlyAsGoodDemo <- cxxfunction(signature(x_="integer"), plugin='Rcpp', body=' Rcpp::IntegerVector x(x_); return 2*x; ') Darren ___

Re: [Rcpp-devel] Parameter Naming

2011-08-23 Thread Darren Cook
> | | So, my proposal would be to use the same names in the signature that you > | | intend to use in the C++ code, but with underline appended. I.e. > > I was sloppy: compile-time errors. I.e. this: > > errorDemo <- cxxfunction(signature(badName="integer"), plugin='Rcpp', body=' > Rcpp::I