R/zzz.R

Defines functions .onAttach .onLoad .onUnload

.onAttach <- function(libname, pkgname){
    ver <- read.dcf(file=system.file("DESCRIPTION", package=pkgname), 
        fields=c("Version", "Date"))
    packageStartupMessage(paste(pkgname, ver[1], "\t", ver[2]))
    invisible(NULL)
}

.onLoad <- function(libname, pkgname){
    ## dcoptions setup
    if (is.null(getOption("dcoptions")))
        options("dcoptions"=list(
            "autoburnin"=TRUE,
            "diag"=0.05,
            "LB"=FALSE,
            "overwrite"=TRUE,
            "RNG"="none",
            "rhat"=1.1,
            "verbose"=1))
    invisible(NULL)
}

.onUnload <- function(libpath){
    ## remove dcoptions
    options("dcoptions"=NULL)
    invisible(NULL)
}

Try the dclone package in your browser

Any scripts or data that you put into this service are public.

dclone documentation built on May 2, 2019, 6:08 p.m.