[R-pkg-devel] Including "Rmath.h" in C code for an R package
Gregory Raskind
gr@@k|nd1 @end|ng |rom gm@||@com
Thu May 30 21:58:12 CEST 2024
Hi,
I'm extending an R package that uses the R C API directly. I'd like to use
some distribution functions, so I included the "Rmath.h" header. The issue
is that this introduces macros that have unintended consequences for the
code. For example, I have a local variable named "beta", which is expanded
to "Rf_beta".
Is there a way of including the "Rmath.h" header without applying the
macros to my code? E.g. if I want to use the beta function, I would use it
with "Rf_beta(a,b)", but "beta" would remain my local variable.
Thanks for your time!
Best,
Greg
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list