R/console.R

Defines functions cat_line func stat char .onAttach

Documented in cat_line char func stat

# Control messaging to console

.onAttach <- function(...) {
  default_log_set()
}

#' @name console-methods
#' @title Methods for printing to console
#' @description Print to console using colours.
#' @param x Character
#' @param ... Objects to print
#' @export
char <- function(x) {
  crayon::green(encodeString(x, quote = "'"))
}

#' @rdname console-methods
#' @export
stat <- function(...) {
  crayon::blue(...)
}

#' @rdname console-methods
#' @export
func <- function(x) {
  crayon::red(paste0(x, '()'))
}

#' @rdname console-methods
#' @export
cat_line <- function(...) {
  cat(paste0(..., "\n"), sep = "")
}

Try the outsider.base package in your browser

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

outsider.base documentation built on April 19, 2021, 1:06 a.m.