powered by
This is a convenience function that ultimately calls mread(). Model code is written to a file and read back in using mread().
mread()
mcode(model, code, project = getOption("mrgsolve.project", tempdir()), ...)mcode_cache( model, code, project = getOption("mrgsolve.project", tempdir()), ... )
mcode_cache( model, code, project = getOption("mrgsolve.project", tempdir()), ... )
model name.
character string specifying a mrgsolve model.
mrgsolve
project directory for the model.
passed to mread(); see that help topic for other arguments that can be set.
Note that the arguments are in slightly different order than mread(). The default project is tempdir().
project
tempdir()
See the mread() help topic for discussion about caching compilation results with mcode_cache().
mcode_cache()
mread(), mread_cache()
mread_cache()
if (FALSE) { code <- ' $CMT DEPOT CENT $PKMODEL ncmt=1, depot=TRUE $MAIN double CL = 1; double V = 20; double KA = 1; ' mod <- mcode("example", code, compile = FALSE) }
Run the code above in your browser using DataLab