inst/tinytest/test-html.R

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

# raw html output
mod <- lm(hp ~ mpg, data = mtcars)
expect_snapshot_print(
    print_html(modelsummary(mod, gof_omit = ".*")),
    "html-gof_omit.html") |> suppressWarnings()

# PR 538
mod <- lm(mpg ~ hp + factor(cyl), data = mtcars)
tab <- msummary(mod, stars = TRUE, output = "html")
expect_true(grepl("\\&lt", tab))

Try the modelsummary package in your browser

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

modelsummary documentation built on Sept. 11, 2024, 6:44 p.m.