Re: [Rcpp-devel] g++ flags

2014-05-06 Thread Kevin Ushey
Hi Gabor, Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X should be set to any value; we try to set it to nothing (ie, define it but leave it empty) but apparently that is not accepted. I just pushed a bug fix to GitHub and it works on my Windows VM; can you give it another

Re: [Rcpp-devel] g++ flags

2014-05-06 Thread Gabor Grothendieck
On Windows with R 3.1 I installed the latest Rcpp from github and did the following but the compliation gave an error which was was due to the C++11 constructs. If I rerun it but uncomment the Sys.setenv line then it works. What do I do to get the cpp11 attribute to work? library(Rcpp) # Sys.sete

[Rcpp-devel] New features in Rcpp

2014-05-06 Thread Kevin Ushey
Hi everyone, Two features have been committed to the master branch of Rcpp on GitHub (https://github.com/RcppCore/Rcpp): 1. The ListOf class These function like R lists, under the assumption that each element of that list is of type T. This should allow you to write code like: typedef ListO

Re: [Rcpp-devel] How to define a function called when R exited

2014-05-06 Thread Jamie Olson
I believe you're looking for `.Last`. Unfortunately there's no way to set `on.exit(...)` for the global environment. >From the ?quit documentation: Immediately before terminating, .Last() is executed if the function .Last exists and runLast is true. If in interactive use there are errors in the .

[Rcpp-devel] How to define a function called when R exited

2014-05-06 Thread Jerome MARQUET
Hello, I am building a package "myModule" and would like to define a function that will be called when R is exited. So I defined a function /RcppExport void R_unload_mlxComputeR(DllInfo *info)// //{// //// Do sthg// //}// / and I observe that it is called when dyn.unload(

Re: [Rcpp-devel] Questions on extending Rcpp wrap and as with templates

2014-05-06 Thread Florian Burkart
Hi Romain, You are correct. I have changed to specializations as below. However, as to the return type, are you saying the header file then also becomes RcppExport std::vector< TimedOptDouble > GetSunPositions(SEXP a) instead of RcppExport SEXP GetSunPositions(SEXP a) ? Or do I leave the hea

Re: [Rcpp-devel] How to create list of list without known structure

2014-05-06 Thread Florian Burkart
Perfect, thank you On Tue, May 6, 2014 at 1:01 PM, Romain Francois wrote: > > Le 6 mai 2014 à 09:35, Florian Burkart a > écrit : > > > Hi, > > > > I have been creating lists of lists with > > > > return Rcpp::List::create(Rcpp::Named("vec") = someVector, > > Rcpp::Named

Re: [Rcpp-devel] Save objects across sessions

2014-05-06 Thread Dirk Eddelbuettel
On 6 May 2014 at 09:41, [email protected] wrote: | Hello | | I am trying to enhance my enhance my Rcpp class with the functionality to | be saved across R sessions. For convenience reasons I would like to do that | in R, using the ReferenceClass's S4 member function 'finalize()'. My plan Yo

Re: [Rcpp-devel] How to create list of list without known structure

2014-05-06 Thread Romain Francois
Le 6 mai 2014 à 09:35, Florian Burkart a écrit : > Hi, > > I have been creating lists of lists with > > return Rcpp::List::create(Rcpp::Named("vec") = someVector, > Rcpp::Named("lst") = someList, > Rcpp::Named("vec2") = someOtherVector); >

Re: [Rcpp-devel] How to create list of list without known structure

2014-05-06 Thread Dirk Eddelbuettel
Hi Florian, On 6 May 2014 at 09:35, Florian Burkart wrote: | Hi, | | I have been creating lists of lists with | | return Rcpp::List::create(Rcpp::Named("vec") = someVector, |                           Rcpp::Named("lst") = someList, |                           Rcpp::Named("vec2") = someOtherVect

[Rcpp-devel] Save objects across sessions

2014-05-06 Thread soeren . vogel
Hello I am trying to enhance my enhance my Rcpp class with the functionality to be saved across R sessions. For convenience reasons I would like to do that in R, using the ReferenceClass's S4 member function 'finalize()'. My plan is to simply save all object's fields (vectors of various types)

[Rcpp-devel] How to create list of list without known structure

2014-05-06 Thread Florian Burkart
Hi, I have been creating lists of lists with return Rcpp::List::create(Rcpp::Named("vec") = someVector, Rcpp::Named("lst") = someList, Rcpp::Named("vec2") = someOtherVector); or to follow Romain: using namespace Rcpp ; return List::create(

Re: [Rcpp-devel] Questions on extending Rcpp wrap and as with templates

2014-05-06 Thread Romain Francois
Le 6 mai 2014 à 08:45, Florian Burkart a écrit : > Hi everyone (and Dirk), > > Second attempt on corrected email list. > > I have been trying to extend Rcpp with my own wrap and as templates. > > Two issues: > > 1) I need to explicitly call wrap. Is that expected? > > So for example I wrote