R/pillar.r

Defines functions type_sum.peacefully_mapped type_sum.quietly_mapped type_sum.safely_mapped pillar_shaft.peacefully_mapped pillar_shaft.quietly_mapped pillar_shaft.safely_mapped

#' @importFrom pillar pillar_shaft
#' @export
pillar_shaft.safely_mapped <- function(x, ...) {
  out <- format(x)
  pillar::new_pillar_shaft_simple(out, align = "left",
    width = 3, min_width = 3, na_indent = 0)
}

#' @importFrom pillar pillar_shaft
#' @export
pillar_shaft.quietly_mapped <- function(x, ...) {
  out <- format(x)
  pillar::new_pillar_shaft_simple(out, align = "left",
    width = 7, min_width = 7, na_indent = 0)
}

#' @importFrom pillar pillar_shaft
#' @export
pillar_shaft.peacefully_mapped <- function(x, ...) {
  out <- format(x)
  pillar::new_pillar_shaft_simple(out, align = "left",
    width = 9, min_width = 9, na_indent = 0)
}

# -----------------------------------------------------------------------------

#' @importFrom pillar type_sum
#' @export
type_sum.safely_mapped <- function(x) { "collat" }

#' @importFrom pillar type_sum
#' @export
type_sum.quietly_mapped <- function(x) { "collat" }

#' @importFrom pillar type_sum
#' @export
type_sum.peacefully_mapped <- function(x) { "collat" }

Try the collateral package in your browser

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

collateral documentation built on Oct. 25, 2021, 9:08 a.m.