Skip to contents

R-CMD-check Codecov test coverage License: GPL v2 Lifecycle: experimental

Quick Start

library(fmrireg)

# Load a benchmark dataset
bm <- load_benchmark_dataset("BM_Canonical_HighSNR")

# Create an event model
events <- bm$core_data$event_table
sframe <- sampling_frame(blocklens = bm$core_data$run_length, TR = bm$core_data$TR)
emod <- event_model(onset ~ hrf(condition), data = events, 
                   block = ~run, sampling_frame = sframe)

# Fit the model
fit <- fmri_lm(emod, dataset = bm$core_data)

Performance Configuration

The internal C++ routines use RcppParallel. You can control the number of threads by setting the R option fmrireg.num_threads or the environment variable FMRIREG_NUM_THREADS before loading the package. If either is set, fmrireg calls RcppParallel::setThreadOptions() when it loads.

Development Status

fmrireg is currently in active development. While the core functionality is stable, the API may change as we continue to improve the package. Please file issues for bugs or feature requests.

Citation

If you use fmrireg in your research, please cite:

Buchsbaum, B. R. (2024). fmrireg: fMRI Analysis in R.
R package version 0.1.0. https://github.com/bbuchsbaum/fmrireg