tests/testthat/test_str_replace_all.r

test_that("general test case", {
  formstr <- "A*0.2+C*0.13+D*1000 + (1|D) + (D|1+C)"
  replace <- c("(1|D)", "(D|1+C)")
  out <- str_replace_all(formstr, replace)
  expect_equal(out, "A*0.2+C*0.13+D*1000 +  + ")
})

Try the simDAG package in your browser

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

simDAG documentation built on April 3, 2025, 10:35 p.m.