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

2024-06-03 Thread Gregory Raskind
Thank you for the suggestion! It looks like that caused problems with other parts of the code, so I just added these couple of lines after the import to avoid the beta remaps: #ifdef beta #undef beta #endif On Mon, Jun 3, 2024 at 5:56 AM Duncan Murdoch wrote: > On 2024-06-02 7:39 p.m., Iris Sim

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

2024-06-03 Thread Duncan Murdoch
On 2024-06-02 7:39 p.m., Iris Simmons wrote: 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 ... and then remember to include the "Rf_" prefix on the routines that you do want to use. Duncan Murdoch

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