A JAGS module is a dynamically loaded library that extends the functionality of JAGS. These functions load and unload JAGS modules and show the names of the currently loaded modules. The load.pkg.module function is provided specifically for use from other R packages containing JAGS modules and checks for binary compatibility between rjags and the indicated package (given by the name argument) before loading the module embedded within the package. Note that this would normally be done in the .onAttach function.
load.module(name, path, quiet=FALSE)
load.pkg.module(pkgname, libname, bin.compat, quiet=FALSE,
check.only=FALSE)
unload.module(name, quiet=FALSE)
list.modules()
name of the module to be loaded
file path to the location of the DLL. If omitted,
the option jags.moddir is used to locate the modules
a logical. If TRUE, no message will be printed
about loading the module
name of the R package containing the module to be loaded
path to the library directory where the R package can be found
a list generated by pkg.compile.flags
at build time by the package containing the JAGS module to be loaded
a logical. If TRUE, binary compatibility checks will
be performed but the module will not be loaded (and the package named by
pkgname need not exist). This is useful for testing purposes.
Martyn Plummer
list.modules()
load.module("glm")
list.modules()
unload.module("glm")
list.modules()
Run the code above in your browser using DataLab