as.tac: Creates a tac object from a data.frame

Description Usage Arguments Details Value See Also Examples

View source: R/tac_methods.R

Description

tac objects can be created from data.frame objects with 'as.tac()'. The time and activity units must be specified as arguments if not already set as attributes in the data.frame. The columns of the data frame are the regional time activity curves, with the column names the names of the ROIs.

Usage

1
as.tac(x, time_unit = NULL, activity_unit = NULL)

Arguments

x

data.frame with start, end time and tac data

time_unit

NULL if in data.frame or set to "seconds" or "minutes"

activity_unit

NULL if in data.frame or set to "kBq/cc", "Bq/cc", "nCi/cc"

Details

If the time_unit and activity_unit attributes are already in the data.frame, they do not need to be set again, but otherwise they will need to be specified in the input parameters.

Value

tac object

See Also

Other Loading functions: load_tac, load_voistat, load_vol

Examples

1
2
3
manual <- data.frame(start=c(0:4), end=c(2:6), 
                     ROI1=c(10.1:14.2), ROI2=c(11:15))
manual_tac <- as.tac(manual, time_unit="minutes", activity_unit="kBq/cc")

ropensci/tacmagic documentation built on Feb. 11, 2020, 9:34 p.m.