R/rowid-type.R

Defines functions format.pillar_rif_type rif_type style_star

style_star <- function(x) {
  style_hint(x)
}

rif_type <- function(has_star, ...) {
  star <- if (has_star) "*" else ""
  ret <- structure(
    list(
      star = star
    ),
    class = "pillar_rif_type"
  )
  ret <- set_width(ret, 1L)
  ret
}

#' @export
format.pillar_rif_type <- function(x, width = NULL, ...) {
  style_star(x$star)
}

Try the pillar package in your browser

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

pillar documentation built on March 31, 2023, 10:19 p.m.