type_sum

0th

Percentile

Provide a succinct summary of an object

type_sum() gives a brief summary of object type. Objects that commonly occur in a data frame should return a string with four or less characters. For most inputs, the argument is forwarded to vctrs::vec_ptype_abbr().

obj_sum() also includes the size of the object if vctrs::vec_is() is TRUE.

Keywords
internal
Usage
type_sum(x)

obj_sum(x)

Arguments
x

an object to summarise. Generally only methods of atomic vectors and variants have been implemented.

Lifecycle

type_sum() is in the "questioning" stage, because vctrs::vec_ptype_abbr() provides essentially the same functionality based on a robust framework. The generic will remain available for a while. Users and implementers are encouraged to consider vctrs::vec_ptype_abbr() once it becomes stable.

Aliases
  • type_sum
  • obj_sum
Examples
# NOT RUN {
obj_sum(1:10)
obj_sum(matrix(1:10))
obj_sum(Sys.Date())
obj_sum(Sys.time())
obj_sum(mean)
# }
Documentation reproduced from package pillar, version 1.4.6, License: GPL-3

Community examples

Looks like there are no examples yet.