r-lib / pillar

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

feat: Show missing values in red in `glimpse()` #662

Closed ryanzomorrodi closed 3 months ago

ryanzomorrodi commented 3 months ago

Changes to make glimpse show NAs in red., as brought up in #658.

ryanzomorrodi commented 3 months ago

I added tests and a style_na_if function. I didn't use crayon_red(out[is.na(x)]) because I was concerned about encodeString adding quotes to NA, but it seems like it just transforms it to a character, so it seems like either would work.

krlmlr commented 3 months ago

Thanks!