Debian Codegraph @

tests/testthat/test-lmodel2.R

raw
1 skip_on_cran()
2
3 skip_if_not_installed("modeltests")
4 library(modeltests)
5
6 skip_if_not_installed("lmodel2")
7 suppressPackageStartupMessages(library(lmodel2))
8
9 data("mod2ex2")
10 fit <- lmodel2(Prey ~ Predators, data = mod2ex2, "relative", "relative", 99)
11
12 test_that("lmodel2 tidier arguments", {
13 check_arguments(tidy.lmodel2)
14 check_arguments(glance.lmodel2)
15 })
16
17 test_that("tidy.lmodel2", {
18 td <- tidy(fit)
19 check_tidy_output(td)
20 check_dims(td, 8, 6)
21 })
22
23 test_that("glance.lmodel2", {
24 gl <- glance(fit)
25 check_glance_outputs(gl)
26 })