Re: [R-pkg-devel] Including "Rmath.h" in C code for an R package

2024-06-02 Thread Iris Simmons
To avoid the remapping of beta to Rf_beta, you should define R_NO_REMAP_RMATH before you include Rmath: #define R_NO_REMAP_RMATH #include On Sun, Jun 2, 2024, 19:33 Gregory Raskind wrote: > Hi, > > I'm extending an R package that uses the R C API directly. I'd like to use > some distribution f

[R-pkg-devel] Including "Rmath.h" in C code for an R package

2024-06-02 Thread Gregory Raskind
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 expan