aboutsummaryrefslogtreecommitdiff
path: root/docs/articles/mkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2018-03-03 10:39:34 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2018-03-03 10:39:34 +0100
commit5aec8e34680e05671347f7577ae36c9ad8e37063 (patch)
tree2cfc0f696cc202e9c9a7b7951930bfe88c355d23 /docs/articles/mkin.R
parent7ceb1dc732ac8674dd8dd70b798fe12378ec10af (diff)
parent8650f26f63a64ac8b72326e2679719744ac99f07 (diff)
Merge branch 'master' of kolab:mkin
Diffstat (limited to 'docs/articles/mkin.R')
-rw-r--r--docs/articles/mkin.R34
1 files changed, 0 insertions, 34 deletions
diff --git a/docs/articles/mkin.R b/docs/articles/mkin.R
deleted file mode 100644
index 19e80322..00000000
--- a/docs/articles/mkin.R
+++ /dev/null
@@ -1,34 +0,0 @@
-## ---- include = FALSE----------------------------------------------------
-require(knitr)
-opts_chunk$set(engine='R', tidy=FALSE)
-
-## ---- echo = TRUE, cache = TRUE, fig = TRUE, fig.width = 8, fig.height = 7----
-library("mkin", quietly = TRUE)
-# Define the kinetic model
-m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"),
- M1 = mkinsub("SFO", "M2"),
- M2 = mkinsub("SFO"),
- use_of_ff = "max", quiet = TRUE)
-
-
-# Produce model predictions using some arbitrary parameters
-sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
-d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO,
- c(k_parent = 0.03,
- f_parent_to_M1 = 0.5, k_M1 = log(2)/100,
- f_M1_to_M2 = 0.9, k_M2 = log(2)/50),
- c(parent = 100, M1 = 0, M2 = 0),
- sampling_times)
-
-# Generate a dataset by adding normally distributed errors with
-# standard deviation 3, for two replicates at each sampling time
-d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2,
- sdfunc = function(x) 3,
- n = 1, seed = 123456789 )
-
-# Fit the model to the dataset
-f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE)
-
-# Plot the results separately for parent and metabolites
-plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright"))
-

Contact - Imprint