Learn R Programming

SafeMapper (version 1.0.0)

s_future_map: Safe Future Map - Parallel with Auto-Recovery

Description

Parallel mapping with automatic checkpointing. Requires the furrr package.

Usage

s_future_map(
  .x,
  .f,
  ...,
  .options = NULL,
  .env_globals = parent.frame(),
  .progress = FALSE,
  .id = NULL,
  .session_id = NULL
)

s_future_map_chr( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

s_future_map_dbl( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

s_future_map_int( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

s_future_map_lgl( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

s_future_map_dfr( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

s_future_map_dfc( .x, .f, ..., .options = NULL, .env_globals = parent.frame(), .progress = FALSE, .id = NULL, .session_id = NULL )

Value

A list.

Arguments

.x

A list or atomic vector.

.f

A function, formula, or vector.

...

Additional arguments passed to .f.

.options

A furrr_options object (NULL uses defaults).

.env_globals

The environment to look for globals.

.progress

A single logical.

.id

Optional name for ID column (dfr/dfc variants).

.session_id

Character. Optional session ID.

Examples

Run this code
# \donttest{
library(future)
plan(multisession)
result <- s_future_map(1:100, ~ .x^2)
plan(sequential)  
# }

Run the code above in your browser using DataLab