[c6d5fb]: R / unix / zzz.R.in Maximize Restore History

Download this file

zzz.R.in    32 lines (26 with data), 770 Bytes

.onLoad <- function(lib, pkg)
{
    ## Load the rjags wrapper.
    library.dynam("rjags", pkg, lib, local=FALSE)

    ## Set the module directory
    if (is.null(getOption("jags.moddir"))) {
        options("jags.moddir" = "@JAGS_MODDIR@")
    }
    load.module("basemod", quiet=TRUE)
    load.module("bugs", quiet=TRUE)

    ## Set progress bar type
    if (is.null(getOption("jags.pb"))) {
        options("jags.pb"="text")
    }
}

.onAttach <- function(lib, pkg)
{
    packageStartupMessage("Linked to JAGS ",
                          .Call("get_version", PACKAGE="rjags"))
    packageStartupMessage("Loaded modules: ",
                          paste(list.modules(), collapse=","))
}

.onUnload <- function(libpath)
{
    library.dynam.unload("rjags", libpath)
}