tests/testthat/test-basis-size.R

# Test overview() & methods

test_that("basis_size works for a GAM", {
  expect_silent(bs <- basis_size(m_gam))
  expect_type(bs, "double")
  expect_identical(length(bs), 4L)
  expect_named(bs, smooths(m_gam))
})

Try the gratia package in your browser

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

gratia documentation built on June 25, 2024, 5:08 p.m.