tests/testthat/test-utils.R

# h_get_covariate_parts ----

test_that("h_get_covariate_parts works as expected", {
  expect_null(h_get_covariate_parts(NULL))
  expect_identical(h_get_covariate_parts("bla"), "bla")
  expect_identical(h_get_covariate_parts("bla:FOO"), c("bla", "FOO"))
  expect_identical(h_get_covariate_parts(c("bla:FOO", "X")), c("bla", "FOO", "X"))
  expect_identical(h_get_covariate_parts(c("bla*FOO", "X")), c("bla", "FOO", "X"))
})

Try the tern.mmrm package in your browser

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

tern.mmrm documentation built on June 22, 2024, 9:38 a.m.