tests/testthat/test-find_data.R

test_that("find_data works for glm", {
  expect_identical(
    find_data(fit_glm),
    fit_glm$data
  )
})

test_that("find_data fails for lm", {
  expect_error(
    find_data(fit_lm),
    "data must be provided explicitly for lm objects"
  )
})

Try the RobinCar2 package in your browser

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

RobinCar2 documentation built on April 3, 2025, 9:34 p.m.