This function extracts the relative or global time of each sample/acquisition from a sampling_frame
.
Usage
# S3 method for sampling_frame
samples(x, blockids = NULL, global = FALSE, ...)
Arguments
- x
A sampling_frame object.
- blockids
A numeric vector of block IDs to extract the samples from. If NULL (default), all block IDs are used.
- global
A logical value. If TRUE, the global time (with respect to the first block) of each sample/acquisition is returned. If FALSE (default), the relative time (with respect to the last block) of each sample/acquisition is returned.
- ...
Additional arguments (currently unused).
Examples
frame <- sampling_frame(blocklens = c(100, 100, 100), TR = 2, precision = 0.5)
# The relative time (with respect to the last block) in seconds of each sample/acquisition
sam <- samples(frame)
# The global time (with respect to the first block) of each sample/acquisition
gsam <- samples(frame, global = TRUE)