Get Run Duration from Sampling Frame
Source:R/all_generic.R, R/dataset_methods.R, R/sampling_frame_adapters.R
get_run_duration.RdCalculates the duration of each run in seconds.
Usage
get_run_duration(x, ...)
# S3 method for class 'matrix_dataset'
get_run_duration(x, ...)
# S3 method for class 'fmri_dataset'
get_run_duration(x, ...)
# S3 method for class 'fmri_mem_dataset'
get_run_duration(x, ...)
# S3 method for class 'fmri_file_dataset'
get_run_duration(x, ...)
# S3 method for class 'fmri_study_dataset'
get_run_duration(x, ...)
# S3 method for class 'sampling_frame'
get_run_duration(x, ...)See also
get_total_duration for total duration,
get_run_lengths for run lengths in timepoints
Examples
# \donttest{
# Create a sampling frame with different run lengths
sf <- fmrihrf::sampling_frame(blocklens = c(100, 120), TR = 2)
get_run_duration(sf) # Returns: c(200, 240) seconds
#> [1] 200 240
# }