Better 'Typst' Tables

Create 'Typst' table markup from data frames. Features a pipe-friendly interface for column, row, and cell styling with support for grouped headers, grouped rows, and data-driven formatting.


typstable

R-CMD-check Codecov testcoverage

The purpose of typstable /ˈtaɪps.tə.bᵊl/ is to produce publication-ready tables for Quarto documents targeting the Typst format. Typst is a modern, open-source, markup-based typesetting system that provides an alternative to LaTeX for rendering PDF documents. This package allows R users to create Typst tables with elaborate formatting.

Example

# Create table with data-driven styling
tbl <- tt(cars, cols = c(.rownames, all_of(style_cols)), preamble='#set text(font: "Arial")') |>
  tt_header_above(c(" " = 1, "Performance" = 2, "Characteristics" = 4)) |>
  tt_column(-1, color = "color_{col}", fill = "bg_{col}") |>
  tt_pack_rows(index = table(cars$brand)) |>
  tt_column(1, width = "25%")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("typstable")

0.1.0 by Filip Reierson, 8 months ago


https://freierson.github.io/typstable/, https://github.com/freierson/typstable


Report a bug at https://github.com/freierson/typstable/issues


Browse source code at https://github.com/cran/typstable


Authors: Filip Reierson [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports rlang, tidyselect

Suggests testthat, knitr, rmarkdown, tibble, dplyr


See at CRAN