R/tbl_sum.R

Defines functions vec_ptype_abbr.tbl_df tbl_sum.tbl_df

#' @importFrom pillar tbl_sum
#' @export
pillar::tbl_sum

#' @export
#' @importFrom pillar dim_desc
tbl_sum.tbl_df <- function(x, ...) {
  c("A tibble" = dim_desc(x))
}

#' @importFrom pillar obj_sum
#' @export
pillar::obj_sum

#' @importFrom pillar type_sum
#' @export
pillar::type_sum

#' @importFrom pillar size_sum
#' @export
pillar::size_sum

#' @export
vec_ptype_abbr.tbl_df <- function(x, ...) {
  abbr <- class(x)[[1]]
  if (abbr == "tbl_df") {
    abbr <- "tibble"
  }
  abbr
}

Try the tibble package in your browser

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

tibble documentation built on March 31, 2023, 11 p.m.