tests/testthat/test_xgx_check_data.R

library(xgxr)
context("Data Check")

data_missing <- data.frame(x = 1)

test_that("xgx_check_data throws correct errors", {
  expect_warning(
    expect_error(
      xgx_check_data(data_missing),
      "These columns must be present in the dataset: ID,EVID,AMT,TIME,DV,YTYPE"),
    "Setting CENS column equal to 0")
})

Try the xgxr package in your browser

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

xgxr documentation built on April 23, 2021, 1:07 a.m.