[Rcpp-devel] Use cholmod modify module in an Rcpp / RcppEigen package

Dirk Eddelbuettel edd at debian.org
Fri Oct 7 00:21:46 CEST 2022


Salut Etienne,

Sorry for missing this email yesterday.

On 5 October 2022 at 12:35, etienne.come at univ-eiffel.fr wrote:
| I want to use the cholmod functions from the modify module https://github.com/PetterS/SuiteSparse/tree/master/CHOLMOD/Modify inside an Rcpp/RcppEigen R package. 
| 
| >From my understanding, these functions are not exposed by Rcpp or RcppEigen but RcppEigen expose a subset of cholmod functionalities via the RcppEigenCholmod header (https://github.com/RcppCore/RcppEigen/blob/master/inst/include/RcppEigenCholmod.h) and the actual sources come from the Matrix package https://github.com/cran/Matrix/tree/master/src/CHOLMOD. 

Right. All this goes back to careful work by Doug back when his hierarchical
model code predominantly relied on (Rcpp)Eigen.

| I've checked that the modify module is present in the src folder of the Matrix package https://github.com/cran/Matrix/tree/master/src/CHOLMOD/Modify but I'm lost on how to proceed in order to be able to use it. 
| Any help on the best way to achieve this will be greatly welcome. 

Well that is a different package, namely Matrix.

We have some examples of sharing / exporting code between packages.  But to a
very first approximation ... if you just want to get going, maybe make a copy
of Modify/ in your package?  Assumming, of course, there are no conflicts
with the other exported interfaces from Matrix and RcppEigen.

Best regards,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list