bd_extract: Extract data from blooddata objects

View source: R/kinfitr_blooddata.R

bd_extractR Documentation

Extract data from blooddata objects

Description

Pull out data for modelling purposes.

Usage

bd_extract(
  blooddata,
  output = c("Blood", "BPR", "parentFraction", "AIF"),
  startTime = 0,
  stopTime = NULL,
  interpPoints = 6000,
  what = c("raw", "pred", "interp"),
  bpr_peakfrac_cutoff = 0.001
)

Arguments

blooddata

The blooddata object.

output

What curve should be extracted. It can be "Blood", "BPR" (whole-blood-to-plasma-ratio), "parentFraction" or "AIF".

startTime

The starting time for the interpolation. Defaults to zero. If, after application of the TimeShift value in the blooddata object, the startTime is still after zero, it will be set to zero.

stopTime

The end time for the interpolation. Defaults to the maximum measured time.

interpPoints

The number of points to interpolate over between the start and stop times. Defaults to 6000.

what

What kind of data should be extracted? The "raw" data is the unaltered data for modelling, the "pred" data is the predicted data at the times of the original samples for assessing correspondence, and the "interp" values are the values interpolated through the interptimes.

bpr_peakfrac_cutoff

What is the lowest permissible value of the blood or plasma curves as a fraction of the peak that should be included in the raw BPR extraction for modelling. This is to avoid ratios which tend towards 0 or Inf at early time points when blood and plasma are very low.

Value

A tibble with the relevant data

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples

## Not run: 
bd_extract(blooddata, output="parentFraction", what="raw")

## End(Not run)

mathesong/kinfitr documentation built on Nov. 27, 2024, 1:38 a.m.