[R-pkg-devel] How ton print in the console from Rcpp

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sat Oct 22 16:22:36 CEST 2022


On 20 October 2022 at 13:16, Elysée Aristide wrote:
| Thank you very much for your answers.
| 
| I finally noticed that the issue comes from the numerical optimization, in which I use the class MFuncGrad of the package RcppNumerical. Is there any problem in using this class? This is the only way I know to compute integrals of perform numerical optimizations in Rcpp. The other way might be: construct the function to be minimized in Rcpp and use the function optim in R. But this is not efficient.

That package is also used by others [1] and you should maybe study their code
and setup as it seems unlikely to me that your woes are due to
RcppNumerical. It likely is a simple inadvertent issue in your package.

Dirk

[1] https://cloud.r-project.org/web/packages/RcppNumerical/index.html shows
Reverse imports:
  BayesPPD, ccdf, glmdisc, MCPModPack, secr, teachingApps
Reverse linking to:
  apeglm, BayesPPD, BVSNLP, CDatanet, COMIX, fido, gbeta, glmdisc,
  MCPModPack, OwenQ, secr, teachingApps, vennLasso, ztpln 
which should give you plenty of examples.


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



More information about the R-package-devel mailing list