

   FFoorreeiiggnn FFuunnccttiioonn IInntteerrffaaccee

        dyn.load(libname)
        dyn.unload(libname)

        is.loaded(symbol)
        symbol.C(name)
        symbol.For(name)

   AArrgguummeennttss::

    libname: a character string giving the pathname to a DLL.

     symbol: a character string giving a symbol name.

       name: a character string giving either the name of a C
             function or Fortran subroutine. Fortran names
             probably need to be given entirely in lower case
             (but this may be system-dependent).

   VVaalluuee::

        The function `dyn.load' is used for its side effect
        which links the specified shared library to the execut-
        ing R image.  Calls to `.C', `.Fortran' and `.External'
        can then be used to execute compiled C functions or
        Fortran subroutines contained in the library.

        The function `dyn.unload' unlinks the shared library.

        Functions `symbol.C' and `symbol.For' map function /
        subroutine names to the symbol name in the compiled
        code: `is.loaded' checks if the symbol name is loaded
        and so available for use in `.C' ....

   NNoottee::

        The creation of shared libraries and the runtime link-
        ing of them into executing programs is very platform
        dependent.  In recent years there has been some simpli-
        fication in the process because the C subroutine call
        `dlopen' has become the standard for doing this under
        UNIX.  Under UNIX `dyn.load' uses the `dlopen' mecha-
        nism and should work on all platforms which support it.
        On Windows it uses the standard mechanisms for loading
        32-bit DLLs.

        The original code for loading DLLs in UNIX was provided
        by Heiner Schwarte.  The compatibility code for HP-UX
        was provided by Luke Tierney.

   SSeeee AAllssoo::

        `.C', `.Fortran', `.External'.

   EExxaammpplleess::

        is.loaded(symbol.For("hcass2")) #-> probably  FALSE
        library(mva)
        is.loaded(symbol.For("hcass2")) #-> TRUE

