tests/testthat/test-acceptable.R

df <- data.frame(x = c(1, 2, 5, 6, 6), y = c(2, 3, 6, 5, 4))
m <- lm(x ~ as.factor(y), df)

test_that("acceptable_formula fails in expected cases", {
  expect_error(acceptable_formula(m))
})

Try the tidypredict package in your browser

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

tidypredict documentation built on Jan. 22, 2023, 1:41 a.m.