Get Number of Runs from Sampling Frame
Source:R/all_generic.R, R/dataset_methods.R, R/sampling_frame_adapters.R
n_runs.RdExtracts the total number of runs/blocks from objects containing temporal structure information.
Usage
n_runs(x, ...)
# S3 method for class 'matrix_dataset'
n_runs(x, ...)
# S3 method for class 'fmri_dataset'
n_runs(x, ...)
# S3 method for class 'fmri_mem_dataset'
n_runs(x, ...)
# S3 method for class 'fmri_file_dataset'
n_runs(x, ...)
# S3 method for class 'fmri_study_dataset'
n_runs(x, ...)
# S3 method for class 'sampling_frame'
n_runs(x, ...)See also
get_run_lengths for individual run lengths,
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)
n_runs(sf) # Returns: 3
#> [1] 3
# }