Skip to content
Back to skills

R Parallel Local

ASecurity

R local parallel computing with parallel, future, furrr. Use for multi-core processing.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 4, 2026
data

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill r-parallel-local --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Parallel Local?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for R Parallel Local
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-r-parallel-local/badge)](https://www.skillsdirectory.com/skills/leolin990405-r-parallel-local)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: r-parallel-local
description: R local parallel computing with parallel, future, furrr. Use for multi-core processing.
---

# R Local Parallel Computing

Multi-core processing.

## parallel

```r
library(parallel)

# Detect cores
detectCores()
detectCores(logical = FALSE)

# mclapply (Unix)
results <- mclapply(1:100, function(x) x^2, mc.cores = 4)

# parLapply (all platforms)
cl <- makeCluster(4)
clusterExport(cl, c("data", "my_function"))
clusterEvalQ(cl, library(dplyr))
results <- parLapply(cl, 1:100, function(x) x^2)
stopCluster(cl)

# parSapply
cl <- makeCluster(4)
results <- parSapply(cl, 1:100, function(x) x^2)
stopCluster(cl)

# Load balancing
results <- parLapplyLB(cl, tasks, process_task)
```

## future

```r
library(future)

# Plan
plan(sequential)       # Default
plan(multisession)     # Background R sessions
plan(multicore)        # Forked (Unix)
plan(cluster, workers = 4)

# Future
f <- future({ slow_computation() })
result <- value(f)

# Multiple futures
f1 <- future({ task1() })
f2 <- future({ task2() })
results <- values(list(f1, f2))

# Resolved?
resolved(f)

# Nested
plan(list(
  tweak(multisession, workers = 2),
  tweak(multisession, workers = 4)
))
```

## furrr

```r
library(furrr)

plan(multisession, workers = 4)

# Parallel map
results <- future_map(1:100, ~ .x^2)
results <- future_map_dbl(1:100, ~ .x^2)
results <- future_map_dfr(files, read_csv)

# With progress
results <- future_map(1:100, ~ .x^2, .progress = TRUE)

# Options
results <- future_map(
  data_list,
  process_data,
  .options = furrr_options(seed = TRUE)
)
```

## foreach

```r
library(foreach)
library(doParallel)

# Setup
cl <- makeCluster(4)
registerDoParallel(cl)

# Parallel loop
results <- foreach(i = 1:100, .combine = c) %dopar% {
  i^2
}

# With packages
results <- foreach(i = 1:100, .packages = "dplyr") %dopar% {
  # code using dplyr
}

# Nested
results <- foreach(i = 1:10) %:%
  foreach(j = 1:10) %dopar% {
    i * j
  }

stopCluster(cl)
```

Files in this skill

  • SKILL.md1.9 KB
  • doParallel/SKILL.md3.5 KB
  • foreach/SKILL.md1.3 KB
  • furrr/SKILL.md1.4 KB
  • future/SKILL.md1.5 KB
  • parallel/SKILL.md3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.