diff --git a/R/functions.R b/R/functions.R index e1ee1ca..e28ace1 100644 --- a/R/functions.R +++ b/R/functions.R @@ -693,3 +693,19 @@ buildSignatureMatrixMAST <- function(scdata, return(Sig) } + +#' A wrapper function whether to suppress messages +#' +#' @param verbose Whether to produce an output on the console. +#' +#' @return A function which will suppress messages or not, depending on the verbose parameter +#' +verbose_wrapper <- function(verbose) { + return(function(method) { + if (!verbose) { + suppressMessages(method) + } else { + method + } + }) +} \ No newline at end of file