tests/testthat/test-roxytest-testexamples-show_models.R

# Generated by roxytest: Do not edit by hand!

context("File R/show_models.R: @testexamples")

test_that("Function show_models() @ L29", {
  
  library(survival)
  zz <- ezcox(lung, covariates = c("sex", "ph.ecog"), controls = "age", return_models = TRUE)
  mds <- get_models(zz)
  show_models(mds)
  show_models(mds, model_names = paste0("Model ", 1:2))
  show_models(mds, covariates = c("sex", "ph.ecog"))
  show_models(mds, drop_controls = TRUE)
  show_models(mds, merge_models = TRUE)
  p <- show_models(mds, merge_models = TRUE, drop_controls = TRUE)
  p
  expect_s3_class(p, "ggplot")
})

Try the ezcox package in your browser

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

ezcox documentation built on May 31, 2023, 7:49 p.m.