aboutsummaryrefslogtreecommitdiff
path: root/R/parent_solutions.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-03 05:08:25 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-03 05:08:25 +0100
commit5a986f2064cf0b2fbd94e636cc4fa56d9939ca42 (patch)
tree514eae70fc01dca7e198da475e05221571d382ee /R/parent_solutions.R
parenta5874ab7fce4616e80be69366ff0685332f47bf1 (diff)
C implementation of the SFO function
Only pays off for large time series with length >> 100
Diffstat (limited to 'R/parent_solutions.R')
-rw-r--r--R/parent_solutions.R6
1 files changed, 2 insertions, 4 deletions
diff --git a/R/parent_solutions.R b/R/parent_solutions.R
index 04226b73..bbdffc21 100644
--- a/R/parent_solutions.R
+++ b/R/parent_solutions.R
@@ -22,11 +22,9 @@
#'
#' \dontrun{plot(function(x) SFO.solution(x, 100, 3), 0, 2)}
#'
+#' @useDynLib mkin SFO_solution
#' @export
-SFO.solution <- function(t, parent_0, k)
-{
- parent = parent_0 * exp(-k * t)
-}
+SFO.solution <- function(t, parent_0, k) .Call(SFO_solution, as.double(t), as.double(parent_0), as.double(k))
#' First-Order Multi-Compartment kinetics
#'

Contact - Imprint