px | R Documentation |
For certain parameters, a length value is required. Examples include the
setting of font sizes (e.g., in cell_text()
) and thicknesses of lines
(e.g., in cell_borders()
). Setting a length in pixels with px()
allows
for an absolute definition of size as opposed to the analogous helper
function pct()
.
px(x)
x |
Numeric length in pixels
The numeric value to format as a string (e.g., |
A character vector with a single value in pixel units.
Use the exibble
dataset to create a gt table. Inside of the
cell_text()
call (which is itself inside of tab_style()
), we'll use the
px()
helper function to define the font size for the column labels in units
of pixels.
exibble |> gt() |> tab_style( style = cell_text(size = px(20)), locations = cells_column_labels() )
8-3
v0.2.0.5
(March 31, 2020)
Other helper functions:
adjust_luminance()
,
cell_borders()
,
cell_fill()
,
cell_text()
,
currency()
,
default_fonts()
,
escape_latex()
,
from_column()
,
google_font()
,
gt_latex_dependencies()
,
html()
,
md()
,
nanoplot_options()
,
pct()
,
random_id()
,
row_group()
,
stub()
,
system_fonts()
,
unit_conversion()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.