From a571c73f333661eae2aba228a9c20adcfff6a941 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Thu, 7 Jul 2022 13:41:26 +0200 Subject: [PATCH] docs: `tbl_sum()` is already part of pillar --- R/tbl-sum.R | 11 ++++++++--- man/tbl_sum.Rd | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/R/tbl-sum.R b/R/tbl-sum.R index 02b904521..c8a80c79c 100644 --- a/R/tbl-sum.R +++ b/R/tbl-sum.R @@ -5,12 +5,17 @@ #' and additional information in the other elements (such as grouping for \pkg{dplyr}). #' The default implementation forwards to [pillar::obj_sum()]. #' -#' This generic will be moved to \pkg{pillar}, and reexported from there -#' as soon as it becomes available. -#' #' @return A named character vector, describing the dimensions in the first element #' and the data source in the name of the first element. #' +#' @examples +#' tbl_sum(1:10) +#' tbl_sum(matrix(1:10)) +#' tbl_sum(data.frame(a = 1)) +#' tbl_sum(Sys.Date()) +#' tbl_sum(Sys.time()) +#' tbl_sum(mean) +#' #' @seealso [pillar::type_sum()] #' @param x Object to summarise. #' @export diff --git a/man/tbl_sum.Rd b/man/tbl_sum.Rd index 503e560da..7ade9c1bf 100644 --- a/man/tbl_sum.Rd +++ b/man/tbl_sum.Rd @@ -19,9 +19,14 @@ which should include the dimensions and the data source in the first element, and additional information in the other elements (such as grouping for \pkg{dplyr}). The default implementation forwards to \code{\link[=obj_sum]{obj_sum()}}. } -\details{ -This generic will be moved to \pkg{pillar}, and reexported from there -as soon as it becomes available. +\examples{ +tbl_sum(1:10) +tbl_sum(matrix(1:10)) +tbl_sum(data.frame(a = 1)) +tbl_sum(Sys.Date()) +tbl_sum(Sys.time()) +tbl_sum(mean) + } \seealso{ \code{\link[=type_sum]{type_sum()}}