inst/tinytest/test-print.R

source("helpers.R")
using("tinysnapshot")

tab <- tt(mtcars[1:4, 1:5])

options("tinytable_print_output" = "markdown")
void <- capture.output(x <- print(tab))
expect_equivalent(x@output, "markdown")

options("tinytable_print_output" = "latex")
void <- capture.output(x <- print(tab))
expect_equivalent(x@output, "latex")

options("tinytable_print_output" = "typst")
void <- capture.output(x <- print(tab))
expect_equivalent(x@output, "typst")

# avoid launching a viewer
# options("tinytable_print_output" = "html")
# void <- capture.output(x <- print(tab))
# expect_equivalent(x@output, "html")

Try the tinytable package in your browser

Any scripts or data that you put into this service are public.

tinytable documentation built on Oct. 5, 2024, 5:06 p.m.