Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which math functions are actually accessible in the C++ code? #9

Open
stouffer opened this issue May 31, 2024 · 2 comments
Open

Which math functions are actually accessible in the C++ code? #9

stouffer opened this issue May 31, 2024 · 2 comments

Comments

@stouffer
Copy link

I'm struggling a bit to figure out precisely which math operations are and are not available for us in the C++ code that defines a model. It seems like it's just whatever is in the usual math.h. But given that Rcpp is also being used, is might there be a way to expand the toolbox a bit and include things like Rmath.h too? This would seem to be a big boon based on the additional operations that can be found therein: https://teuder.github.io/rcpp4everyone_en/300_Rmath.html

@thk686
Copy link
Owner

thk686 commented May 31, 2024

All of the R C-functions should be available in Rcpp. Its been awhile so I don't recall the syntax. Something like R::rnorm(...) or Rf_rnorm(...).

@stouffer
Copy link
Author

stouffer commented Jun 3, 2024

You're absolutely right. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants