Write a metamodel file (.mmdl)
write_mmdl.RdWrites an NlmePmlModel object to a text based metamodel file (.mmdl).
Usage
write_mmdl(
model,
file,
datafile,
author = "",
engineParams = NULL,
tableParams = NULL,
absolutePaths = FALSE
)Arguments
- model
An NlmePmlModel object.
- file
Output metamodel file path to create/overwrite.
- datafile
Input data file path to write into the
## DATAblock.Optional author string to write into the metamodel.
- engineParams
Optional NlmeEngineExtraParams object created by
engineParams()to serialize into the## ESTARGSblock. Only arguments that differ fromengineParams()defaults for this model (and estimation method) are written, so the block lists explicit overrides only.- tableParams
Optional table definition(s) created by
tableParams()(i.e., NlmeTableDef and/or NlmeSimTableDef, or a list of them) to serialize into the## TABLESblock.- absolutePaths
Logical; how to write the
datafilepath into the## DATAblock.FALSE(default) makes it relative to the metamodel directory (e.g../data.csv), producing portable metamodels.TRUEwrites the normalized absolute path. When a relative path cannot be expressed (different Windows drive) the function warns and falls back to absolute.