R/messages.R

#' Less scary green messages
#'
#' @param ... message components (see \code{\link[base]{message}})
#' @param domain (see \code{\link[base]{message}})
#' @param appendLF append new line? (see \code{\link[base]{message}})
#'
#' @return TRUE
#' @keywords internal
#'
message <- function (..., domain = NULL, appendLF = TRUE) {
  if (is.null(knitr::opts_knit$get('rmarkdown.pandoc.to'))) {
    # not in knitr environment
    base::message("\033[32m", ..., "\033[39m", 
                  domain = domain, appendLF = appendLF)
  } else {
    base::message(..., domain = domain, appendLF = appendLF)
  }
}

Try the faux package in your browser

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

faux documentation built on April 20, 2023, 9:13 a.m.