tests/testthat/test-Newlevels.R

# Ensure the levels make their way to new level set
test_that("The set factor levels are the same in the new object", {
  expect_equal(all.equal(c('Treatment 1','Treatment 2', 'Treatment 3'),  Newlevels(prostate.crr, levels = list(TX = c('Treatment 1','Treatment 2', 'Treatment 3')))$cph.f$Design$parms$TX), TRUE)
})

Try the QHScrnomo package in your browser

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

QHScrnomo documentation built on May 29, 2024, 9:21 a.m.