# Generated by roxytest: Do not edit by hand!
context("File R/ezcox.R: @testexamples")
test_that("Function ezcox() @ L62", {
library(survival)
# Build unvariable models
t1 <- ezcox(lung, covariates = c("age", "sex", "ph.ecog"))
t1
# Build multi-variable models
# Control variable 'age'
t2 <- ezcox(lung, covariates = c("sex", "ph.ecog"), controls = "age")
t2
# Return models
t3 <- ezcox(lung,
covariates = c("age", "sex", "ph.ecog"),
return_models = TRUE
)
t3
t4 <- ezcox(lung,
covariates = c("sex", "ph.ecog"), controls = "age",
return_models = TRUE
)
t4
expect_s3_class(t1, "ezcox")
expect_s3_class(t2, "ezcox")
expect_s3_class(t3, "ezcox")
expect_s3_class(t4, "ezcox")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.