diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-03 05:08:25 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-03 05:08:25 +0100 |
commit | 5a986f2064cf0b2fbd94e636cc4fa56d9939ca42 (patch) | |
tree | 514eae70fc01dca7e198da475e05221571d382ee /R | |
parent | a5874ab7fce4616e80be69366ff0685332f47bf1 (diff) |
C implementation of the SFO function
Only pays off for large time series with length >> 100
Diffstat (limited to 'R')
-rw-r--r-- | R/parent_solutions.R | 6 |
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 #' |