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.
Best, Aristide ________________________________ From: Dirk Eddelbuettel <[email protected]> Sent: Thursday, October 20, 2022 2:42:23 PM To: Ivan Krylov <[email protected]> Cc: Elys��e Aristide <[email protected]>; [email protected] <[email protected]> Subject: Re: [R-pkg-devel] How ton print in the console from Rcpp On 20 October 2022 at 14:46, Ivan Krylov wrote: | �� Thu, 20 Oct 2022 12:43:30 +0200 | Elys��e Aristide <[email protected]> ��ڧ�֧�: | | > What I understood is that it is better to use Rcpp functions. So I | > used: | > | > Rcpp::Rcout << "beta: \n"; | > Rcpp::print(betacpp); | > Rcpp::Rcout << "log-likelihood: " << llh << "\n"; | | This seems to be a right way of printing from Rcpp code. Yup! And as stated that alone does not cause `__assert_rtn` or many of the now almost 2600 Rcpp-using packages (that print this way) would have issues. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | [email protected] [[alternative HTML version deleted]]
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
