diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-08 17:36:04 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-05-08 17:36:04 +0200 |
commit | 7b9f11562fa9ab8a023f47e6b99a2562b668e48c (patch) | |
tree | 1ee12f8b84773781117ce67c96c8e21b7c7a99a2 /R | |
parent | ea9b76c667620d75c5aeb4077117e722ed0bc3d6 (diff) |
Profiling suggests the merge in mkinfit is the bottleneck
Diffstat (limited to 'R')
-rw-r--r-- | R/mkinfit.R | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R index f0738ffc..6cfb88c0 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -587,6 +587,9 @@ mkinfit <- function(mkinmod, observed, out_long <- mkin_wide_to_long(out, time = "time") + # Surprisingly, the next line is the one taking the most time for one, two + # or three observed variables if we use compiled ODE models + # as evidenced by use of github:hadley/lineprof cost_data <- merge(observed[c("name", "time", "value")], out_long, by = c("name", "time"), suffixes = c(".observed", ".predicted")) |