R/zzz.R

Defines functions assert mssg .onAttach

#'
#'
.onAttach <- function(lib, pkg)  {
    packageStartupMessage("This is vegdata ",
    utils::packageDescription("vegdata", field="Version"), paste(' - build: '),
    utils::packageDate('vegdata'),
    appendLF = TRUE)
    if(is.null(getOption('tv.iconv'))) options(tv.iconv = 'ISO-8859-15')
}

mssg <- function(v, ...) if (v) message(...)

assert <- function(x, y) {
    if (!is.null(x)) {
        if (!inherits(x, y)) {
            stop(deparse(substitute(x)), " must be of class ",
                 paste0(y, collapse = ", "), call. = FALSE)
        }
    }
}

Try the vegdata package in your browser

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

vegdata documentation built on Dec. 28, 2022, 2:39 a.m.