tests/testthat/test_ExtractConfounders.R

context("ExtractExposureConfounders")

test_that("splines", {
  res <- ExtractExposureConfounders("splines::ns(x,df=2)")
  expect_equal(res, "x")
})

test_that("interaction", {
  res <- ExtractExposureConfounders("a*b")
  expect_equal(res, c("a", "b"))
})
raubreywhite/RAWmisc documentation built on May 27, 2019, 2:04 a.m.