tests/testthat/test-return-data.R

context("Test hrcompet estimation and data return")

test_that("Wheter return gives desired data dimensions", {

  set.seed(1)
  data <- hrcomprisk::dat_ckid
  dat_final<-npcrest(data, exit, event, exposure=b1nb0, entry, eoi=2)
  expect_equal(nrow(dat_final$cuminc), 187)
  expect_equal(ncol(dat_final$cuminc), 11)

})

Try the hrcomprisk package in your browser

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

hrcomprisk documentation built on Jan. 22, 2020, 1:07 a.m.