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

# Generated by roxytest: Do not edit by hand!

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

test_that("Function show_forest() @ L36", {
  
  library(survival)
  show_forest(lung, covariates = c("sex", "ph.ecog"), controls = "age")
  show_forest(lung, covariates = c("sex", "ph.ecog"), controls = "age", merge_models = TRUE)
  show_forest(lung,
    covariates = c("sex", "ph.ecog"), controls = "age", merge_models = TRUE,
    drop_controls = TRUE
  )
  p <- show_forest(lung,
    covariates = c("sex", "ph.ecog"), controls = "age", merge_models = TRUE,
    vars_to_show = "sex"
  )
  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.