inst/tinytest/test-deprecated.R

mod <- lm(hp ~ mpg, mtcars)

# hard deprecation
expect_warning(
  modelsummary(mod, statistic_vertical = TRUE),
  pattern = "deprecated")
expect_warning(
  modelsummary(mod, statistic_vertical = FALSE),
  pattern = "deprecated")

# soft deprecation
tab1 = modelsummary(mod, statistic_override = "robust")
tab2 = modelsummary(mod, vcov = "robust")
expect_identical(tab1, tab2)
expect_error(
  modelsummary(mod, vcov = "robust", statistic_override = "robust"),
  pattern = "deprecated")

Try the modelsummary package in your browser

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

modelsummary documentation built on Oct. 15, 2023, 5:06 p.m.