samples.sampling_frame | R Documentation |
This function extracts the relative or global time of each sample/acquisition from a sampling_frame
.
## S3 method for class 'sampling_frame'
samples(x, blockids = NULL, global = FALSE, ...)
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). |
A numeric vector of sample times extracted from the specified sampling_frame
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.