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
, 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+
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
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
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
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
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