From 3f318275c9ee0eaac0c7b1e4999b234204bc0573 Mon Sep 17 00:00:00 2001 From: mathesong Date: Thu, 15 Aug 2024 13:34:31 +0200 Subject: [PATCH] Fixed a small bug which caused strange AIF when interpolating parent fraction with no early time points --- R/kinfitr_blooddata.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/kinfitr_blooddata.R b/R/kinfitr_blooddata.R index abb2f16..cedf68a 100644 --- a/R/kinfitr_blooddata.R +++ b/R/kinfitr_blooddata.R @@ -968,6 +968,12 @@ bd_extract_pf <- function(blooddata, return(pf) } + # For pred and interp, we want interpolation to start at 1 at time 0 + if(!(0 %in% pf$time)) { + pf <- rbind(c(0,1), + pf) + } + blood <- bd_extract_bpr(blooddata, startTime, stopTime, what = "pred") ## Interp