[R-pkg-devel] R_registerRoutines, etc.

Rolf Turner r.turner at auckland.ac.nz
Mon Apr 24 00:18:41 CEST 2017

On 23/04/17 23:05, Duncan Murdoch wrote:

>>> Looks like
>>> extern void F77_NAME(mnnd)(double *, double *, int *, double *,
>>> double *);
>>> to me.

One more (I hope it's the last!) question:

One of my subroutines has an argument of type *logical*.  There is no 
logical type in C.  So, since I am perforce using C-speak, I cannot 
change "void *" to "void logical".

I have a (very vague) understanding that in C one uses variables of int 
type (taking the values 0, for FALSE, and 1, for TRUE) as logical variables.

On that understanding I took a punt and replaced "void *" by "int *" for
the logical type variable.  The package built and passed

     "R CMD check --as-cran"

so it seems that this is OK.  Is this the Right Thing To Do?  Are there 
any (obvious?) lurking perils?




Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

More information about the R-package-devel mailing list