Nothing
library(testthat)
context("Test the simulate method with tabular datasets")
seed <- 1
source(file.path(getwd(), test_path(), "test-utils.R"))
test_that("Simulate a bolus using the tabular dataset", {
model <- model_suite$testing$nonmem$advan4_trans4
regFilename <- "simple_bolus"
dataset <- Dataset() %>%
add(Bolus(time = 0, amount = 1000, compartment = 1)) %>%
add(Observations(times = seq(0, 24, by = 0.5)))
simulation <- expression(
table <- dataset %>% export(dest = destEngine, model = model, seed = seed),
simulate(model = model, dataset = table, dest = destEngine, seed = seed) # seed not important as IIV is part of table
)
test <- expression(
output_regression_test(results, output = "CP", filename = regFilename)
)
campsis_test(simulation, test, env = environment())
# Same but remove ARM column (ARM not mandatory)
simulation <- expression(
table <- dataset %>% export(dest = destEngine, model = model, seed = seed) %>% dplyr::select(-ARM),
simulate(model = model, dataset = table, dest = destEngine, seed = seed) # seed not important as IIV is part of table
)
test <- expression(
output_regression_test(results, output = "CP", filename = regFilename)
)
campsis_test(simulation, test, env = environment())
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.