tests/gt-examples/01-html-script/html-02-morley.R

library(gt)

# Create a display table based on `morley`
morley_tbl <-
  gt(morley) %>%
  fmt_number(
    columns = Speed,
    decimals = 0,
    sep_mark = ",") %>%
  cols_align(align = "left", columns = c(Run, Speed))

morley_tbl
rstudio/gt documentation built on April 29, 2024, 10:37 p.m.