tests/testthat/test_surv_prediction_breakdown.R

context("surv_prediction_breakdown")

source("objects_for_tests.R")

test_that("Creating surv_prediction_breakdown", {
  expect_is(broken_prediction, "surv_prediction_breakdown_explainer")
  expect_is(broken_prediction, "data.frame")
})


test_that("Wrong input",{
  expect_error(prediction_breakdown(surve_cph_null_data))
  expect_error(prediction_breakdown(explainer))
})

Try the survxai package in your browser

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

survxai documentation built on Aug. 28, 2020, 5:07 p.m.