View source: R/kinfitr_miscfuncs.R
tidyinput_art | R Documentation |
Function to tidy up the input argument vectors for arterial input models.
tidyinput_art(t_tac, tac, weights, frameStartEnd)
t_tac |
Numeric vector of times for each frame in minutes. |
tac |
Numeric vector of radioactivity concentrations in the target tissue for each frame. |
weights |
Optional. Numeric vector of the weights assigned to each frame in the fitting. |
frameStartEnd |
Optional. This allows one to specify the beginning and final frame to use for modelling, e.g. c(1,20). |
This function i) adds uniform weights if weights are not specified, ii) checks that the lengths of t_tac, tac and weights are of the same length, iii) shortens the vectors if a frameStartEnd is specified, iv) Checks whether there are negative values in t_tac due to adjusting for delay iv) adds a zero frame if there is not one, and v) checks that times are in minutes and not in seconds.
A list containing the tidied up t_tac, tac and weights ready for modelling.
Granville J Matheson, mathesong@gmail.com
data(pbr28)
t_tac <- pbr28$tacs[[2]]$Times / 60
tac <- pbr28$tacs[[2]]$STR
weights <- pbr28$tacs[[2]]$Weights
tidyinput_art(t_tac, tac, weights, frameStartEnd = c(1, 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.