Skip to contents

Extracts the list of horizontal and vertical rule objects configured via fr_hlines(), fr_vlines(), or fr_grid(). Each element is an fr_rule object describing position, width, colour, and line style.

Usage

fr_get_rules(spec)

Arguments

spec

An fr_spec object from fr_table() or fr_listing().

Value

A list of fr_rule objects. Empty list if no rules are configured.

See also

fr_hlines() for horizontal rules, fr_vlines() for vertical rules, fr_grid() for full grid.

Examples

spec <- tbl_demog |> fr_table() |> fr_hlines("header")
rules <- fr_get_rules(spec)
length(rules)            # depends on "header" preset
#> [1] 1
rules[[1]]$direction     # "horizontal"
#> [1] "horizontal"