R/utils.R

Defines functions suppressVerbose

suppressVerbose <- function(expr, envir = parent.frame(), suppress = TRUE) {
  if (is.na(suppress)) suppress <- FALSE
  expr <- substitute(expr)
  if (suppress) {
    expr <- bquote({
      capture.output(suppressMessages({
        res <- withVisible(.(expr))
      }), type="output", split=FALSE)
      res
    })
  } else {
    expr <- bquote(withVisible(.(expr)))
  }
  res <- eval(expr, envir=envir, enclos=baseenv())
  if (res$visible) res$value else invisible(res$value)
}

Try the QDNAseq package in your browser

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

QDNAseq documentation built on Nov. 8, 2020, 6:57 p.m.