inst/tinytest/test-zzz.R

source("helpers.R")

# glue with no statistic
# first time lmer raises a warn_once
requiet("lme4")
mod <- lmer(mpg ~ hp + (1 | cyl), data = mtcars)
tab <- modelsummary(
  mod,
  output = "data.frame",
  gof_map = NA,
  statistic = c(
    "t = {statistic}",
    "p = {p.value}"
  )
)
expect_equivalent(nrow(tab), 8)

Try the modelsummary package in your browser

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

modelsummary documentation built on June 8, 2025, 9:32 p.m.