tests/testthat/test-data.R

#Use the testthat package to test data
#Created by ZWu, Feb 14, 2025.

data("case_control")

test_that("case_control dataset is loaded correctly", {
  # Check that the dataset is a data frame with 2000 rows and 16 columns
  expect_true(is.data.frame(case_control))
  expect_equal(nrow(case_control), 2000)
  expect_equal(ncol(case_control), 16)
})

Try the DPComb package in your browser

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

DPComb documentation built on Aug. 22, 2026, 5:08 p.m.