Skip to content

R header files

1 message · Brian Ripley

#
The R header files have been reorganised, and for the first time documented
(in the Writing R Extensions manual).

The recommended header file for user code is R.h. S.h still exists, but
includes rather less, plus some S-compatibility defines.

This should be included before Rdefines.h (but for now this is worked
around)

Rdefines.h includes Rinternals.h.

If you need any of the auxilliary header files

    Applic.h Arith.h Complex.h Error.h Linpack.h Mathlib.h Memory.h
    PrtUtil.h Random.h Utils.h f2c.h

they are now in R_HOME/include/R_ext.  Currently this is searched, but it
will not be come 1.0.  Of these Arith.h Complex.h Error.h Memory.h Random.h
Utils.h are included by R.h. [The rationale here is to remove the chance
of name clashes, so you will only get the R versions if you ask for the 
directory specifically.]

Blas.h has gone (its contents are included in both Linpack.h and Applic.h)
and Errormsg.h is for internal use only.  Fortran.h is no longer installed
(was anyone using it, and if so for what?)

Would package writers who have C code please try out R-devel, and

   *   If you use Rdefines.h or Rinternals.h consider including R.h.
   *   If you use any of Applic.h Linpack.h Mathlib.h f2c.h add R_ext.
   *   If you use any of Arith.h Complex.h Error.h Memory.h Random.h
       Utils.h  remove them and include R.h.

Looking over the packages I have to hand:

foreign/src/minitab needs to declare R.h
tree and tseries need to declare R.h and remove some headers.
cclust needs "R_ext/f2c.h"


Please let me know of any problems. This might seem a nuisance now, but
does allow us to document a stable interface and so avoid future problems.