Get Run Lengths from Sampling Frame
Source:R/all_generic.R, R/dataset_methods.R, R/sampling_frame_adapters.R
get_run_lengths.RdExtracts the lengths of individual runs/blocks from objects containing temporal structure information.
Usage
get_run_lengths(x, ...)
# S3 method for class 'matrix_dataset'
get_run_lengths(x, ...)
# S3 method for class 'fmri_dataset'
get_run_lengths(x, ...)
# S3 method for class 'fmri_mem_dataset'
get_run_lengths(x, ...)
# S3 method for class 'fmri_file_dataset'
get_run_lengths(x, ...)
# S3 method for class 'fmri_study_dataset'
get_run_lengths(x, ...)
# S3 method for class 'sampling_frame'
get_run_lengths(x, ...)Value
Integer vector where each element represents the number of timepoints in the corresponding run
Details
This function is synonymous with blocklens but uses
terminology more common in fMRI analysis. Each run represents a
continuous acquisition period, and the run length is the number
of timepoints (volumes) in that run.
See also
blocklens for equivalent function,
n_runs for number of runs,
n_timepoints for total timepoints
Examples
# \donttest{
# Create a sampling frame with 3 runs
sf <- fmrihrf::sampling_frame(blocklens = c(100, 120, 110), TR = 2)
get_run_lengths(sf) # Returns: c(100, 120, 110)
#> [1] 100 120 110
# }