Column data
Internal class for formatting the data for a column.
pillar_shaft()
is a coercion method that must be implemented
for your data type to display it in a tibble.
Your subclass must implement format()
, the default implementation just
raises an error.
Your format()
method can assume a valid value for the width
argument.
pillar_shaft(x, ...) ## S3 method for class 'pillar_shaft' print(x, width = NULL, ...) ## S3 method for class 'pillar_shaft' format(x, width, ...) ## S3 method for class 'logical' pillar_shaft(x, ...) ## S3 method for class 'numeric' pillar_shaft(x, ..., sigfig = NULL) ## S3 method for class 'Date' pillar_shaft(x, ...) ## S3 method for class 'POSIXt' pillar_shaft(x, ...) ## S3 method for class 'character' pillar_shaft(x, ..., min_width = NULL) ## S3 method for class 'pillar_vertical' pillar_shaft(x, ..., min_width = NULL, na_indent = 0L, shorten = NULL) ## S3 method for class 'list' pillar_shaft(x, ...) ## S3 method for class 'factor' pillar_shaft(x, ...) ## S3 method for class 'AsIs' pillar_shaft(x, ...) ## Default S3 method: pillar_shaft(x, ...)
x |
A vector to format |
... |
Arguments passed to methods. |
width |
Width for printing and formatting. |
sigfig |
Deprecated, use |
min_width |
Deprecated, use |
na_indent |
Indentation of |
shorten |
How to abbreviate the data if necessary:
|
The default method will currently format via format()
,
but you should not rely on this behavior.
pillar_shaft(1:3) pillar_shaft(1.5:3.5) pillar_shaft(NA) pillar_shaft(c(1:3, NA))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.