tests/testthat/test-searchReplace.R

test_that("searchReplace", {
  model <- readModelDb("PK_1cmt")
  expect_equal(
    functionBody(
      searchReplace(model, find = "lka", replace = "lka + etalka")
    )[[4]][[2]][[2]],
    str2lang("ka <- exp(lka + etalka)")
  )
})

Try the nlmixr2lib package in your browser

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

nlmixr2lib documentation built on Oct. 7, 2024, 5:08 p.m.