R/deparse1.R

#' @title Backport of deparse1 for R < 4.0.0
#' @rdname deparse1
#'
#' @description
#' See the original description in \code{base::deparse1}.
#'
#' @keywords internal
#' @rawNamespace if (getRversion() < "4.0.0") export(deparse1)
#' @examples
#' # get function from namespace instead of possibly getting
#' # implementation shipped with recent R versions:
#' bp_deparse1 = getFromNamespace("deparse1", "backports")
#'
#' bp_deparse1(quote(`foo bar`))
deparse1 = function (expr, collapse = " ", width.cutoff = 500L, ...) {
  paste(deparse(expr, width.cutoff, ...), collapse = collapse)
}

Try the backports package in your browser

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

backports documentation built on June 24, 2024, 5:24 p.m.