tests/testthat/test_form_resp.R

test_that("form_resp returns correct response", {
  my_formula <- formula("x~y+1")
  expect_equal(form_resp(my_formula), "x")
  my_formula <- formula("~y+1")
  expect_null(form_resp(my_formula))
})

Try the tidysdm package in your browser

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

tidysdm documentation built on April 3, 2025, 9:56 p.m.