tests/testthat/test-importance_survreg.R

context("test-importance_survreg")

test_that("importance.survreg works", {
  imp <- importance(survreg_model, survival::ovarian, nperm = n_permutation_tests)
  expect_equal(class(imp), "importance_plot")
  plot(imp)
})

test_that("importance.survreg works with weights", {
  imp <- importance(survreg_model_weighted, survival::ovarian, nperm = n_permutation_tests)
  expect_equal(class(imp), "importance_plot")
  plot(imp)
})

Try the tornado package in your browser

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

tornado documentation built on May 29, 2024, 2:01 a.m.