paint | R Documentation |
paint is an alternative print method of objects that are of class
data.frame
. It has been described as a "pretty pillar::glimpse()
", since it
also favours printing columns running horizontally.
paint(df, ...)
df |
the dataframe to paint |
... |
further arguments to class specific paint methods |
paint tries to be low noise by using colour instead of markup characters.
It also highlights important values like NA
, NULL
, NaN
, and Inf
.
Each supported sub-class of data.frame
has a custom meta data header,
designed to show useful information for wrangling.
The appearance of the output can be customised with options:
paint_palette
the palette to paint row colours with, defaults to
rainbow_6()
, 6 standard ANSI colours that are supported in most terminals.
paint_n_rows
the number of rows to print for each column. Defaults to the
number of colours in the paint_palette
, but can be set higher for repeating sequences.
paint_max_width
the maximum width of the output. 60 is the default. {paint}
does not resize
based on terminal width by design.
paint_align_row_head = c("left", "center", "right")
. How to align the column
title and type. Defaults to "left"
.
paint_dark_mode
darken the paint_palette
using crayon::blurred
- not
supported in all terminals.
df invisibly. Text outputed printed to console.
unpaint()
for calling the default print method on a dataframe
paint(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.