Re: [Rcpp-devel] USE_RINTERNALS and Rcpp

2013-09-23 Thread Hadley Wickham
Thanks! There's no way to make this less fragile (i.e. by using Defn.h), right? (Because Defn.h isn't "exported" by R) Hadley On Mon, Sep 23, 2013 at 11:17 AM, Romain Francois wrote: > Hi, > > I would not do that kind of internal things with Rcpp. Instead put code from > this gist https://gist.

Re: [Rcpp-devel] USE_RINTERNALS and Rcpp

2013-09-23 Thread Romain Francois
Le 23/09/13 18:24, Hadley Wickham a écrit : Thanks! There's no way to make this less fragile (i.e. by using Defn.h), right? (Because Defn.h isn't "exported" by R) Hadley I'm afraid you're right. Defn.h is not part of the distributed files. Now you might be able to negociate that some of thes

Re: [Rcpp-devel] USE_RINTERNALS and Rcpp

2013-09-23 Thread Hadley Wickham
> And for these: > > extern void UNIMPLEMENTED_TYPE(const char *s, SEXP x) ; > extern SEXP csduplicated(SEXP) ; Fortunately for my version, I don't actually need those, but I'll see if I can find a friendly member of R-core who might be willing to review a patch. Hadley -- Chief Scientist, RStu

Re: [Rcpp-devel] USE_RINTERNALS and Rcpp

2013-09-23 Thread Romain Francois
Hi, I would not do that kind of internal things with Rcpp. Instead put code from this gist https://gist.github.com/romainfrancois/6672944 on a .c file and go old school about it: $ R CMD SHLIB size.c $ Rscript -e "dyn.load('size.so'); siz <- function(.) .Call( 'siz', .) ; siz(1:10); siz(siz)

Re: [Rcpp-devel] USE_RINTERNALS and Rcpp

2013-09-23 Thread Dirk Eddelbuettel
On 23 September 2013 at 10:45, Hadley Wickham wrote: | Is it possible to access the R internals api through Rcpp? For Yes/No/Maybe. If you peruse the ChangeLog for Rcpp you may notice see that we had to change a few things over the years 'because "they" took them away'. That includes silly thin