-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
We're already obeying getOption("max.print") via print(format(x)), but we're still calling format() on the full vctr. We could do a better job by providing the necessary infrastructure in obj_print() and passing max to obj_print_footer() .
I'll experiment with pillar::num() and pillar::char() .
print(vctrs::new_vctr(letters), max = 10)
#> <vctrs_vctr[26]>
#> [1] a b c d e f g h i j k l m n o p q r s t u v w x y z
options(max.print = 5)
print(vctrs::new_vctr(letters))
#> <vctrs_vctr[26]>
#> [1] a b c d e
#> [ reached getOption("max.print") -- omitted 21 entries ]
print(letters, max = 10)
#> [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"
#> [ reached getOption("max.print") -- omitted 16 entries ]
print(letters)
#> [1] "a" "b" "c" "d" "e"
#> [ reached getOption("max.print") -- omitted 21 entries ]Created on 2021-04-08 by the reprex package (v1.0.0)
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement