R/Message-class.R

Defines functions .zeroCounters

.Message <- setRefClass("Message",
    fields=list(
        msg="character"
    ),
    methods=list(
        get = function() .self$msg,
        getNum = function() length(.self$msg),
        zero = function() .self$msg <- character(0),
        add = function(...) {
            m <- paste0(...)
            .self$msg <- append(.self$msg, m)
            m
        })
)

## singletons. Exported but 'hidden' from ls() by the '.'

.error <- .Message()

.warning <- .Message()

.note <- .Message()

.zeroCounters <- function()
{
    .error$zero()
    .warning$zero()
    .note$zero()
}

Try the BiocCheck package in your browser

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

BiocCheck documentation built on Nov. 8, 2020, 5:38 p.m.