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.

obj_sum() also includes the size of the object if is_vector_s3() is TRUE.

type_sum(x)

obj_sum(x)

is_vector_s3(x)

Arguments

x

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

Examples

obj_sum(1:10)
#> [1] "int [10]"
obj_sum(matrix(1:10))
#> [1] "int [10 × 1]"
obj_sum(Sys.Date())
#> [1] "date [1]"
obj_sum(Sys.time())
#> [1] "dttm [1]"
obj_sum(mean)
#> [1] "fn"