Learn R Programming

SafeMapper (version 1.0.0)

s_configure: Configure SafeMapper Settings

Description

Optionally customize SafeMapper behavior. This function is NOT required for basic usage - SafeMapper works out of the box with sensible defaults.

Usage

s_configure(
  batch_size = 100L,
  retry_attempts = 3L,
  auto_recover = TRUE,
  checkpoint_dir = NULL
)

Value

Invisible list of current configuration settings.

Arguments

batch_size

Integer. Number of items to process per batch before checkpointing. Smaller values provide more frequent saves but may slow processing. Default is 100.

retry_attempts

Integer. Number of retry attempts for failed batches. Default is 3.

auto_recover

Logical. Whether to automatically resume from checkpoints when restarting operations. Default is TRUE.

checkpoint_dir

Character. Optional custom directory for storing checkpoint files. If NULL (default), uses the standard R user cache directory via tools::R_user_dir().

Examples

Run this code
# Basic usage - no configuration needed!
# result <- s_map(1:100, slow_function)

# Optional: customize for large operations
s_configure(batch_size = 50)

# Optional: customize for unstable operations
s_configure(retry_attempts = 5)

# \donttest{
# Use custom checkpoint directory (e.g., for testing)
s_configure(checkpoint_dir = tempdir())
# }

Run the code above in your browser using DataLab