Last chance! 50% off unlimited learning
Sale ends in
Makes a copy of a model in a corresponding directory. Problem statement is updated to reflect that the model is LIKE the reference model BUT different in some fundamental way.
likebut(x, but = "better", y = NULL, project = getOption("project",
getwd()), nested = getOption("nested", TRUE), overwrite = FALSE,
ext = getOption("modex", "ctl"), include = "\.def$", ...)
a model name, presumably interpretable as numeric
a short description of the characteristic difference from x
optional name for model to be created, auto-incremented by default
project directory
model files nested in run-specific directories
whether to overwrite y if it exists
extension for the model file
regular expressions for files to copy to new directory
passed arguments
the value of y
# NOT RUN {
# Create a working project.
source <- system.file(package = 'nonmemica','project')
target <- tempdir()
target <- gsub('\\\\','/',target) # for windows
source
target
file.copy(source,target,recursive = TRUE)
project <- file.path(target,'project','model')
# Point project option at working project
options(project = project)
library(magrittr)
# Derive models.
1001 %>% likebut('revised',y = 1002, overwrite=TRUE )
# At this point, edit 1002.ctl to match whatever 'revised' means.
# Then run it with NONMEM.
# }
Run the code above in your browser using DataLab