tests/testthat/test-looks_table.R

test_that(".looks_table expands the looks", {
  lt <- .looks_table(ms_looks("os", fraction = c(0.5, 1)))
  expect_identical(lt$trigger, c("os", "os"))
  expect_equal(lt$fraction, c(0.5, 1))
  expect_equal(lt$time, c(NA_real_, NA_real_))
  lc <- .looks_table(ms_looks("calendar", time = c(24, 36)))
  expect_identical(lc$trigger, c("calendar", "calendar"))
  expect_equal(lc$fraction, c(NA_real_, NA_real_))
  expect_equal(lc$time, c(24, 36))
  lm <- .looks_table(ms_looks(c("calendar", "pfs"), fraction = c(NA, 1), time = c(12, NA)))
  expect_identical(lm$trigger, c("calendar", "pfs"))
  expect_equal(lm$fraction, c(NA, 1))
  expect_equal(lm$time, c(12, NA))
})

Try the DesignComplexSurvival package in your browser

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

DesignComplexSurvival documentation built on Nov. 23, 2026, 5:07 p.m.