Use model object in your package
Arguments
- obj
model to save.
- overwrite
By default,
use_data()will not overwrite existing files. If you really want to do so, set this toTRUE.- compress
Choose the type of compression used by
save(). Should be one of "gzip", "bzip2", or "xz".- internal
If this is run internally. By default this is FALSE
See also
Other Packaging:
rxPkg()
Examples
# run from the root of a package source tree; writes into data/ and src/
if (interactive() && file.exists("DESCRIPTION")) {
pk <- function() {
model({
d/dt(depot) <- -ka * depot
d/dt(central) <- ka * depot - cl / v * central
})
}
rxUse(pk)
# regenerate the compiled code for every model in data/
rxUse()
}
