R/column-group-id.R

Defines functions type_sum.rhub_column_group_id pillar_shaft.rhub_column_group_id `[.rhub_column_group_id` column_group_id

column_group_id <- function(x) {
  structure(x, class = unique(c("rhub_column_group_id", class(x))))
}

#' @export

`[.rhub_column_group_id` <- function(x, i) {
  column_group_id(NextMethod("["))
}

#' @importFrom pillar pillar_shaft new_pillar_shaft_simple
#' @export

pillar_shaft.rhub_column_group_id <- function(x, ...) {
  cx <- shorten_rhub_id(x)
  new_pillar_shaft_simple(cx, ...)
}

#' @importFrom pillar type_sum
#' @export

type_sum.rhub_column_group_id <- function(x) {
  "rhub::group_id"
}

Try the rhub package in your browser

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

rhub documentation built on Aug. 31, 2022, 5:06 p.m.