View source: R/interp_extrap_helpers.R
choose_interp_extrap_method | R Documentation |
This function should be used for any interpolation/extrapolation function. It will standardize the method of choosing which method to use for interpolation and extrapolation.
choose_interp_extrap_method(conc, time, interp_method, extrap_method, tmax)
conc |
A vector of concentrations ( |
time |
A vector of times ( |
interp_method |
Method to use for interpolation between time points |
extrap_method |
Method to use for extrapolation after the last time point above (an AUC calculation method) |
tmax |
Time of maximum concentration |
A character vector of extrapolation methods to use between each
conc
and after the last conc
. Values will be one or more of
"linear" (use linear interpolation), "log" (use log interpolation), "zero"
(the value is zero), and the last value may be "clastpred", "clastobs", or
"zero" indicating extrapolation from tlast using lambda.z and clast,pred or
clast,obs, or zero.
PKNCA:::choose_interp_extrap_method(
conc=c(1, 2, 4, 2, 1, 0, 0),
time=0:6,
interp_method="lin up/log down",
extrap_method="aucinf.obs"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.