Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mcode

Write, compile, and load model code


Description

This is a convenience function that ultimately calls mread. Model code is written to a file and read back in using mread.

Usage

mcode(model, code, project = getOption("mrgsolve.project", tempdir()), ...)

mcode_cache(
  model,
  code,
  project = getOption("mrgsolve.project", tempdir()),
  ...
)

Arguments

model

model name

code

character string specifying a mrgsolve model

project

project name

...

passed to mread; see that help topic for other arguments that can be set

Details

Note that the arguments are in slightly different order than mread. The default project is tempdir().

See the mread help topic for discussion about caching compilation results with mcode_cache.

See Also

Examples

## Not run:  
code <- '
$CMT DEPOT CENT
$PKMODEL ncmt=1, depot=TRUE
$MAIN
double CL = 1;
double V = 20;
double KA = 1;
'

mod <- mcode("example",code)

## End(Not run)

mrgsolve

Simulate from ODE-Based Models

v0.11.1
GPL (>= 2)
Authors
Kyle T Baron [aut, cre] (<https://orcid.org/0000-0001-7252-5656>), Bill Gillespie [ctb], Charles Margossian [ctb], Devin Pastoor [ctb], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Dilawar Singh [ctb], Felicien Le Louedec [ctb] (<https://orcid.org/0000-0003-3699-2729>), Timothy Waterhouse [ctb] (<https://orcid.org/0000-0002-0954-9660>), Metrum Research Group [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.