tbl_sum()
gives a brief textual description of a table-like object,
which should include the dimensions and the data source in the first element,
and additional information in the other elements (such as grouping for dplyr).
The default implementation forwards to obj_sum()
.
Value
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)
#> Description
#> "int [10]"
tbl_sum(matrix(1:10))
#> Description
#> "int [10 × 1]"
tbl_sum(data.frame(a = 1))
#> Description
#> "df [1 × 1]"
tbl_sum(Sys.Date())
#> Description
#> "date [1]"
tbl_sum(Sys.time())
#> Description
#> "dttm [1]"
tbl_sum(mean)
#> Description
#> "fn"