tests/testthat/test-smooth_formula_string.R

test_that("mtcars smooth string works", {
  expect_equal(
    smooth_formula_string(mtcars, 'mpg'),
    "mpg ~ cyl + s(disp) + s(hp) + s(drat) + s(wt) + s(qsec) + vs + am + gear + s(carb,k=3)"

  )
})

Try the autogam package in your browser

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

autogam documentation built on Oct. 2, 2024, 5:07 p.m.