Generate a source package directory from a
SimInf_model object, allowing the model to be
installed as a standalone add-on R package. This is useful for
distributing custom models or for improving startup performance by
compiling the C code once during package installation rather than
on the first call to run().
Usage
package_skeleton(
model,
name = NULL,
path = ".",
author = NULL,
email = NULL,
maintainer = NULL,
license = "GPL-3"
)Arguments
- model
A
SimInf_modelobject to create the package skeleton from.- name
Character string with the package name. It must contain only ASCII letters, numbers, and dots; have at least two characters; start with a letter; and not end in a dot. The package name is also used for the class name of the model and the directory name of the package.
- path
Path to put the package directory in. Default is
"."(the current directory).Author of the package.
Email address of the package maintainer.
- maintainer
Maintainer of the package.
- license
License of the package. Default is
"GPL-3".
Details
The typical workflow is:
Define the model using
mparseorSimInf_model.Call
package_skeletonto generate the packageInstall the package using
install.packagesorR CMD INSTALL.
See also
mparse for creating a SimInf_model
object from a model specification. INSTALL and
install.packages for installing the generated
package.