tidyinput_art: Tidy Up for Models with Arterial Input

View source: R/kinfitr_miscfuncs.R

tidyinput_artR Documentation

Tidy Up for Models with Arterial Input

Description

Function to tidy up the input argument vectors for arterial input models.

Usage

tidyinput_art(t_tac, tac, weights, frameStartEnd)

Arguments

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).

Details

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.

Value

A list containing the tidied up t_tac, tac and weights ready for modelling.

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples


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))

mathesong/kinfitr documentation built on Jan. 15, 2024, 11:07 p.m.