[Rcpp-devel] Method with default params using RCPP_MODULE

2016-10-26 Thread Sergio Bra
I am exposing a c++ class using Rcpp. It works fantastic, but my problem is how to implement a method which has default params. I have the class: class myClass { public: int myMethod(int param1, int param2 = 0); } and I config the module: RCPP_MODULE(mymodule) { class_("myClass

Re: [Rcpp-devel] Method with default params using RCPP_MODULE

2016-10-26 Thread Sergio Bra
, are you talking about programming that behaviour in a *.R file? In case of an affirmative answer, same file where I have the loadModule sentence? Thank you again, Sergio 2016-10-26 17:53 GMT+02:00 Dirk Eddelbuettel : > > On 26 October 2016 at 09:48, Sergio Bra wrote: > | I am exposing a c+

Re: [Rcpp-devel] Method with default params using RCPP_MODULE

2016-10-28 Thread Sergio Bra
Thanks for your useful comments, I am trying something like this in a R file (I have changed the name of my c++ method compared with the example above, now is called myMethodCpp in order to avoid conflicts with the R name's function): myClass$myMethod <- function(param1, param2 = 0L) { invisib

[Rcpp-devel] Applying R functions in a cpp method

2018-04-02 Thread Sergio Bra
Hi everybody, I want to define a cpp function which has as input an R function, which is applied to some internal data of my cpp code (st similar to the map function of the purrr package). An example could be: my_rcpp_function("mean") Internally, I'd have a cpp function which applies that R func

Re: [Rcpp-devel] Applying R functions in a cpp method

2018-04-02 Thread Sergio Bra
Thank you very much!! I didn't find that part reviewing the documentation 2018-04-02 11:10 GMT+02:00 Iñaki Úcar : > 2018-04-02 11:03 GMT+02:00 Sergio Bra : > > Hi everybody, > > > > I want to define a cpp function which has as input an R function, which > is > &g

[Rcpp-devel] Upload library with object files

2019-02-20 Thread Sergio Bra
Hi community, In the near future I'll be trying to publish a package in the CRAN and after reading "Writing R extensions" I have some doubts. I have some c++ functions, available from the R-side with Rcpp. These c++ functions have calls to some C packages. In the src directory I have the source c

Re: [Rcpp-devel] Upload library with object files

2019-02-20 Thread Sergio Bra
ribió: > On Wed, 20 Feb 2019 at 09:33, Sergio Bra wrote: > > > > Hi community, > > > > In the near future I'll be trying to publish a package in the CRAN and > after reading "Writing R extensions" I have some doubts. > > > > I have some c++ fun