apply_styling: Apply Spreadsheet Formatting to gt Table

View source: R/styling.R

apply_stylingR Documentation

Apply Spreadsheet Formatting to gt Table

Description

Applies formatting to a gt table based on information extracted from the spreadsheet file.

Usage

apply_styling(gt_object, formatRdy)

Arguments

gt_object

A gt object.

formatRdy

A data frame with formatting definitions.

Value

A great table!

Examples

example_spreadsheet <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
sprdsht_data <- readxl::read_excel(example_spreadsheet)
gt_table <- gt::gt(sprdsht_data)
format_long <- get_formatting(example_spreadsheet)
format_ready <- translate_defs(format_long)
apply_styling(gt_table, format_ready)


forgts documentation built on April 12, 2025, 1:46 a.m.