run_future: Run Future

View source: R/allgeneric.R

run_futureR Documentation

Run Future

Description

Run a future-based computation defined by obj and frame.

Usage

run_future(obj, frame, processor, ...)
## Default S3 method:
run_future(obj, frame, processor = NULL, verbose = FALSE, analysis_type, ...)

Arguments

obj

An object specifying the computation.

frame

Data frame or environment containing data for the computation.

processor

A function or object specifying how to process the frame.

...

Additional arguments passed to the method-specific function.

verbose

Logical; print progress messages if TRUE.

analysis_type

The analysis type (e.g., "searchlight").

Value

A tibble containing the processed results.

Examples

frame <- tibble::tibble(
  .id = 1:2,
  rnum = c("roi1", "roi2"),
  roi = list(1:3, 4:5),
  size = c(3, 2)
)
mod_spec <- list(process_roi = function(mod_spec, roi, rnum, ...) {
  tibble::tibble(
    result = list(mean(roi)),
    indices = list(seq_along(roi)),
    performance = list(NULL),
    id = rnum
  )
})
run_future(mod_spec, frame, NULL)

bbuchsbaum/rMVPA documentation built on June 10, 2025, 8:23 p.m.