aboutsummaryrefslogtreecommitdiff
path: root/man/mkinmod.Rd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-27 21:52:21 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-27 21:52:21 +0100
commit7a349394413d533d7dab5d18bb29bc761dcd5659 (patch)
tree5817d52007a08405fd3120f32656a813d2422389 /man/mkinmod.Rd
parenteaf3073bf0aeee812574b32f7e557218c61c6255 (diff)
parent1e3fd1bef2a0ec1c8b73fcfefdd62fd3463bc87c (diff)
Merge branch 'saving_compiled_code'
Diffstat (limited to 'man/mkinmod.Rd')
-rw-r--r--man/mkinmod.Rd44
1 files changed, 29 insertions, 15 deletions
diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd
index e5b1c8f3..77319aac 100644
--- a/man/mkinmod.Rd
+++ b/man/mkinmod.Rd
@@ -9,9 +9,13 @@
mkinmod(
...,
use_of_ff = "max",
+ name = NULL,
speclist = NULL,
quiet = FALSE,
- verbose = FALSE
+ verbose = FALSE,
+ dll_dir = NULL,
+ unload = FALSE,
+ overwrite = FALSE
)
\method{print}{mkinmod}(x, ...)
@@ -40,6 +44,8 @@ formation fractions are always used (default). If "min", a minimum use of
formation fractions is made, i.e. each pathway to a metabolite has its
own rate constant.}
+\item{name}{A name for the model. Should be a valid R object name.}
+
\item{speclist}{The specification of the observed variables and their
submodel types and pathways can be given as a single list using this
argument. Default is NULL.}
@@ -49,6 +55,17 @@ argument. Default is NULL.}
\item{verbose}{If \code{TRUE}, passed to \code{\link[inline:cfunction]{inline::cfunction()}} if
applicable to give detailed information about the C function being built.}
+\item{dll_dir}{Directory where an DLL object, if generated internally by
+\code{\link[inline:cfunction]{inline::cfunction()}}, should be saved. The DLL will only be stored in a
+permanent location for use in future sessions, if 'dll_dir' and 'name'
+are specified.}
+
+\item{unload}{If a DLL from the target location in 'dll_dir' is already
+loaded, should that be unloaded first?}
+
+\item{overwrite}{If a file exists at the target DLL location in 'dll_dir',
+should this be overwritten?}
+
\item{x}{An \code{\link{mkinmod}} object.}
\item{submodel}{Character vector of length one to specify the submodel type.
@@ -132,17 +149,21 @@ SFO <- mkinmod(parent = mkinsub("SFO"))
SFO_SFO <- mkinmod(
parent = mkinsub("SFO", "m1"),
m1 = mkinsub("SFO"))
+print(SFO_SFO)
\dontrun{
-# Now supplying full names used for plotting
+ fit_sfo_sfo <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, solution_type = "deSolve")
+
+ # Now supplying compound names used for plotting, and write to user defined location
SFO_SFO.2 <- mkinmod(
parent = mkinsub("SFO", "m1", full_name = "Test compound"),
- m1 = mkinsub("SFO", full_name = "Metabolite M1"))
-
-# The above model used to be specified like this, before the advent of mkinsub()
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1"),
- m1 = list(type = "SFO"))
+ m1 = mkinsub("SFO", full_name = "Metabolite M1"),
+ name = "SFO_SFO", dll_dir = "~/dll", unload = TRUE, overwrite = TRUE)
+# Now we can save the model and restore it in a new session
+saveRDS(SFO_SFO.2, file = "~/SFO_SFO.rds")
+# Terminate the R session here if you would like to check, and then do
+SFO_SFO.3 <- readRDS("~/SFO_SFO.rds")
+fit_sfo_sfo <- mkinfit(SFO_SFO.3, FOCUS_2006_D, quiet = TRUE, solution_type = "deSolve")
# Show details of creating the C function
SFO_SFO <- mkinmod(
@@ -166,13 +187,6 @@ fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par,
quiet = TRUE)
}
-
- m_synth_SFO_lin <- mkinmod(parent = list(type = "SFO", to = "M1"),
- M1 = list(type = "SFO", to = "M2"),
- M2 = list(type = "SFO"), use_of_ff = "max")
-
- print(m_synth_SFO_lin)
-
}
\references{
FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence

Contact - Imprint