tests/testthat/test-cgr_summary.R

test_that("Check summary output", {
  exprfitfunnel <- (survtime <= 100) & (censorid == 1)~ age + sex + BMI
  glmmodfun <- glm(exprfitfunnel, data = surgerydat, family = binomial(link = "logit"))
  suppressWarnings(funnel <- funnel_plot(data = surgerydat, ctime = 3*365, glmmod = glmmodfun, followup = 100))
  expect_equal(funnel$data, summary(funnel))
})

Try the success package in your browser

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

success documentation built on June 22, 2024, 10:19 a.m.