Learn R Programming

pillar

pillar provides tools for styling columns of data, artfully using colour and unicode characters to guide the eye.

Installation

Usage

pillar is a developer-facing package that is not designed for end-users. It powers the print() and format() methods for tibbles. It also and defines generics and helpers that are useful for package authors who create custom vector classes (see https://github.com/krlmlr/awesome-vctrs#readme for examples) or custom table classes (like dbplyr or sf).

Custom vector classes

The primary user of this package is tibble, which lets pillar do all the formatting work. Packages that implement a data type to be used in a tibble column can customize the display by implementing a pillar_shaft() method.

See vignette("pillar", package = "vctrs") for details.

Custom table classes

pillar provides various extension points for customizing how a tibble-like class is printed.

See vignette("extending", package = "pillar") for a walkthrough of the options.


Code of Conduct

Please note that the pillar project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('pillar')

Monthly Downloads

1,533,557

Version

1.9.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

March 22nd, 2023

Functions in pillar (1.9.0)

new_ornament

Helper to define the contents of a pillar
glimpse

Get a glimpse of your data
new_pillar_shaft

Constructor for column data
get_extent

Calculate display width
format_type_sum

Format a type summary
scale_x_num

Scale that supports formatted numbers
pillar_shaft

Column data
pillar-package

pillar: Coloured Formatting for Columns
num

Format a numeric vector in a tibble
type_sum

Provide a succinct summary of an object
tbl_sum

Provide a succinct summary of an object
pillar_options

Package options
squeeze

Squeeze a colonnade to a fixed width
new_tbl_format_setup

Construct a setup object for formatting
new_pillar_component

Components of a pillar
new_pillar

Construct a custom pillar object
new_pillar_title

Prepare a column title for formatting
new_pillar_type

Prepare a column type for formatting
pillar

Object for formatting a vector suitable for tabular display
tbl_format_body

Format the body of a tibble
tbl_format_header

Format the header of a tibble
style_num

Styling helpers
tbl_format_setup

Set up formatting
tbl_format_footer

Format the footer of a tibble
colonnade

Format multiple vectors in a tabular display
align

Alignment helper
dim_desc

Format dimensions
ctl_new_pillar_list

Customize the appearance of compound pillars in your tibble subclass
ctl_new_pillar

Customize the appearance of simple pillars in your tibble subclass
format_glimpse

Format a vector for horizontal printing
extra_cols

Retrieve information about columns that didn't fit the available width
char

Format a character vector in a tibble
deprecated

Deprecated functions
format_tbl

Formatting of tbl objects