tests/testthat/test_plot_ceteris_paribus.R

context("plot_ceteris_paribus")

source("objects_for_tests.R")

test_that("Output", {
  expect_is(plot(cp_cph), "ggplot")
  expect_is(plot(cp_cph, selected_variable = "sex"), "ggplot")
})

test_that("Wrong input",{
  expect_error(plot(cp_cph, selected_variable = "se"))
})

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.