(R-exts.info)The R API


Next: Generic functions and methods Prev: System and foreign language interfaces Up: Top
Enter node , (file) or (file)node

6 The R API: entry points for C code
************************************

Memory allocation
Error signaling
Random numbers
Missing and IEEE values
Printing
Calling C from FORTRAN and vice versa
Numerical analysis subroutines
Optimization
Integration
Utility functions
Re-encoding
Condition handling and cleanup code
Allowing interrupts
Platform and version information
Inlining C functions
Controlling visibility
Standalone Mathlib
Organization of header files
There are a large number of entry points in the R executable/DLL that
can be called from C code (and some that can be called from FORTRAN
code).  Only those documented here are stable enough that they will only
be changed with considerable notice.

   The recommended procedure to use these is to include the header file
'R.h' in your C code by

     #include <R.h>

This will include several other header files from the directory
'R_INCLUDE_DIR/R_ext', and there are other header files there that can
be included too, but many of the features they contain should be
regarded as undocumented and unstable.

   Most of these header files, including all those included by 'R.h',
can be used from C++ code.

     Note: Because R re-maps many of its external names to avoid clashes
     with user code, it is _essential_ to include the appropriate header
     files when using these entry points.

   This remapping can cause problems(1), and can be eliminated by
defining 'R_NO_REMAP' and prepending 'Rf_' to _all_ the function names
used from 'Rinternals.h' and 'R_ext/Error.h'.  These problems can
usually be avoided by including other headers (such as system headers
and those for external software used by the package) before 'R.h'.

   We can classify the entry points as

_API_
     Entry points which are documented in this manual and declared in an
     installed header file.  These can be used in distributed packages
     and will only be changed after deprecation.

_public_
     Entry points declared in an installed header file that are exported
     on all R platforms but are not documented and subject to change
     without notice.

_private_
     Entry points that are used when building R and exported on all R
     platforms but are not declared in the installed header files.  Do
     not use these in distributed code.

_hidden_
     Entry points that are where possible (Windows and some modern
     Unix-alike compilers/loaders when using R as a shared library) not
     exported.

   ---------- Footnotes ----------

   (1) Known problems are redefining 'LENGTH', 'error', 'length',
'vector' and 'warning'


automatically generated by info2www version 1.2.2.9