Sorry for the long subject line but I hope it describes what I want to
do.  I have a C++ class, dgTMatrix, that is exported in a module
definition.

RCPP_MODULE(RcppSp) {
...
    class_<dgCMatrix>("dgCMatrix")
    ...
    ;
}

Many of the methods for this class return other members of this class.
 Can I create a new instance of the reference class in R from within
the module?  I'm sure it is possible, I'm just wondering if there is
an easy way to do this without duplicating large chunks of the code in
Rcpp/src/Module.cpp.  Can i somehow clone the SEXP representing the
current instance then swap the external pointer to the C++ object?
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to