Description of the Issue
When I try to calculate fraction excreted without including amount excreted in the intervals, it sets the value to 0.
Usually with other parameters if they are required for calculation they are added to the intervals in the background and calculated even if not specified, but this doesn't seem to be happening with fe/ae.
Reproducible example:
library(PKNCA)
## Load the PK concentration data
# Create volume column for demonstration purposes
d_conc <- datasets::Theoph %>%
mutate(vol = 2)
## Generate the dosing data
d_dose <- d_conc[d_conc$Time == 0,]
## Create a concentration object
conc_obj <-
PKNCAconc(
d_conc,
conc~Time|Subject,
volume = "vol"
)
## Create a dosing object
dose_obj <-
PKNCAdose(
d_dose,
Dose~Time|Subject
)
## Combine
data_obj <- PKNCAdata(conc_obj, dose_obj)
# set fe interval to TRUE
data_obj$intervals <- data_obj$intervals %>%
mutate(fe = TRUE)
## Calculate the NCA parameters
results_obj <- pk.nca(data_obj)
# Fe = 0
results_obj$result %>%
filter(PPTESTCD == "fe")
# update by adding ae
data_obj$intervals <- data_obj$intervals %>%
mutate(ae = TRUE)
## Re- Calculate the NCA parameters
results_obj <- pk.nca(data_obj)
# now new value for FE
results_obj$result %>%
filter(PPTESTCD == "fe")
Description of the Issue
When I try to calculate fraction excreted without including amount excreted in the intervals, it sets the value to 0.
Usually with other parameters if they are required for calculation they are added to the intervals in the background and calculated even if not specified, but this doesn't seem to be happening with
fe/ae.Reproducible example: