Get Total Duration from Sampling Frame
Source:R/all_generic.R, R/dataset_methods.R, R/sampling_frame_adapters.R
get_total_duration.RdCalculates the total duration of the fMRI acquisition in seconds across all runs.
Usage
get_total_duration(x, ...)
# S3 method for class 'matrix_dataset'
get_total_duration(x, ...)
# S3 method for class 'fmri_dataset'
get_total_duration(x, ...)
# S3 method for class 'fmri_mem_dataset'
get_total_duration(x, ...)
# S3 method for class 'fmri_file_dataset'
get_total_duration(x, ...)
# S3 method for class 'fmri_study_dataset'
get_total_duration(x, ...)
# S3 method for class 'sampling_frame'
get_total_duration(x, ...)See also
get_run_duration for individual run durations,
get_TR for repetition time
Examples
# \donttest{
# Create a sampling frame: 220 timepoints with TR = 2 seconds
sf <- fmrihrf::sampling_frame(blocklens = c(100, 120), TR = 2)
get_total_duration(sf) # Returns: 440 seconds
#> [1] 440
# }