Learn R Programming

docorator (version 0.5.2)

apply_scale: Apply scaling to gt objects

Description

Apply scaling to gt objects

Usage

apply_scale(x, fontsize, tbl_scale, tbl_stub_pct)

# S3 method for default apply_scale(x, fontsize, tbl_scale, tbl_stub_pct)

# S3 method for gt_tbl apply_scale(x, fontsize, tbl_scale, tbl_stub_pct)

# S3 method for gt_group apply_scale(x, fontsize, tbl_scale, tbl_stub_pct)

Value

scaled gt object

Arguments

x

gt object

fontsize

document font size

tbl_scale

Boolean for whether or not to automatically scale table columns to fit display area. Defaults to TRUE. Note that this will overwrite scaling set in the table directly unless set to FALSE.

tbl_stub_pct

percent of total width that should be dedicated to stub column(s). If more than 1 stub column then this is the total for both.

Examples

Run this code
gt <- gt::exibble |>
gt::gt()

apply_scale(gt, fontsize = 10, tbl_scale = FALSE, tbl_stub_pct = "20%")

Run the code above in your browser using DataLab