
Foreign Language Interfaces 203
R_unload_ with suffix the name of the shared library. So, in our example, R
would look for a C routine named R_unload_xxx, and if it is found, it will be
invoked.
Both of the routines, R_init_ and R_unload_, are called with a single
argument, which is a pointer to a DllInfo structure. This structure contains
relevant information for the shared library, and the load and unload code can
make use of any information contained in it.
Exercise 6.8
In the Exercises directory of the RBioinf package there is a template file
named xxx.c. Use this file, together with R CMD SHLIB, to build a shared
library, and load it into R. What happ ...