R/onLoad.R

Defines functions .onLoad

#####################################################################
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of  ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the    ##
## GNU General Public License for more details.                    ##
#####################################################################

.onLoad <- function(libname, pkgname) {
    conf_file <- Sys.getenv("TCPL_CONF")
    if (file.exists(conf_file)) {
        loadConf <- try(gtoxConfLoad(list.new=FALSE))
        if (is(loadConf, 'try-error')) {
            warning(
                "The configuration file given by 'TCPL_CONF' could not be ",
                "loaded. Using default settings. Please see ?gtoxConf for ",
                "more information."
            )
            gtoxConfDefault()
        }
    } else {
        gtoxConfDefault()
    }
}

Try the GladiaTOX package in your browser

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

GladiaTOX documentation built on Nov. 15, 2020, 2:07 a.m.