R/Message-class.R

.Message <- setRefClass("Message",
    fields=list(
        name="character"
    ),
    methods=list(
        append = function(fmt, ...) {
            .self$name <- c(name, sprintf(fmt, ...))
            invisible(.self)
        },
        validity = function() {
            "report if any messages (e.g., after validity check)"
            if (length(name)) name else NULL
        },
        isComplete = function() {
            "stop if any messages"
            if (length(name)) {
                stop(paste(name, collapse="\n"))
            } else TRUE
        }
    )
)

Try the AnnotationHubData package in your browser

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

AnnotationHubData documentation built on April 17, 2021, 6:05 p.m.