library.dynam              package:base              R Documentation

Loading Shared Libraries

Description:

     Load the specified file of compiled code if it has not been loaded
     already.

Usage:

     library.dynam(chname, package = .packages(), lib.loc = NULL,
                   verbose = getOption("verbose"), file.ext, ...)

Arguments:

  chname: a character string naming a shared library to load.

 package: a character vector with the names of packages to search
          through.

 lib.loc: a character vector describing the location of R library trees
          to search through, or `NULL'.  The default value of `NULL'
          corresponds to all libraries currently known.

 verbose: a logical value indicating whether an announcement is printed
          on the console before loading the shared library.  The
          default value is taken from the verbose entry in the system
          options.

file.ext: the extension to append to the file name to specify the
          library to be loaded. This defaults to the appropriate value
          for the operating system.

     ...: additional arguments needed by some libraries that are passed
          to the call to `dyn.load' to control how the library is
          loaded.

Details:

     This is designed to be used inside a package rather than at the
     command line, and should really only be used inside
     `.First.lib()'.  The system-specific extension for shared
     libraries (e.g., `.so' or `.sl' on Unix systems) should not be
     added.

Value:

     The `.Dyn.libs' vector with the names of packages which have used
     `library.dynam' in the current R session.

     It is returned as `invisible', unless the `chname' argument is
     missing.

     Users should never set `.Dyn.libs' directly.

See Also:

     `.First.lib', `library', `dyn.load', `.packages', `.libPaths'

     `SHLIB' for how to create suitable shared libraries.

Examples:

     library.dynam()# which packages have been ``dynamically loaded''

