r-lib / pillar

Format columns with colour
https://pillar.r-lib.org/
Other
178 stars 37 forks source link

FR: Add a pillar.max_chars option #649

Open olivroy opened 1 year ago

olivroy commented 1 year ago

Hello, I was wondering if it was possible to add an option to limit the number of characters printed in a tibble.

I set pillar.min_title_chars to a lower number, and then the column with a long text and a short column name takes up all the space.

I was wondering if it was possible to limit the number of characters printed, like with decimals. pillar.max_dec_width

Thanks

olivroy commented 6 months ago

Also would be great for glimpse().

A long variable may make the summary less informative.

mtcars |> dplyr::mutate(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = 1) |> pillar::glimpse()

The long variable removes information from glimpse() output..