mygt: Turn tibble into gt Table with Custom Formatting

mygtR Documentation

Turn tibble into gt Table with Custom Formatting

Description

Formatting includes:

  • Text align to top/left

  • Smaller row padding

  • No top border

  • Bold column labels

Usage

mygt(df, md = NULL, indent = NULL, remove_border = TRUE)

Arguments

df

Data frame/tibble

md

Optional. If not NULL, then the given columns will be printed with markdown formatting, e.g., md = c(1, 3) for columns 1 and 3.

indent

Ignored.

remove_border

Optional. For indented lines, remove the upper horizontal border line? Defaults to TRUE.

Value

Formatted gt table

Example Output

mygt.png

Examples

data(mtcars)
mtcars %>%
  dplyr::slice(1:5) %>%
  mygt()


stopsack/khsmisc documentation built on Sept. 22, 2023, 12:26 p.m.