R/printing.R

Defines functions dash cat_ln

#' @importFrom cli symbol

rule <- function (..., pad = NULL) {
  if (is.null(pad)) pad <- symbol$line
  title <- if (length(list(...))) paste0(" ", ..., " ") else ""

  width <- max(getOption("width") - nchar(title) - 3, 0)
  paste(pad, title, paste(rep(pad, width), collapse = ""), sep = "")
}

dash <- function(n = 2) {
  paste(rep(symbol$line, n), collapse = "")
}

cat_ln <- function(..., sep = "") {
  cat(..., "\n", sep = sep)
}

Try the sessioninfo package in your browser

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

sessioninfo documentation built on May 2, 2019, 11:07 a.m.