r-performance

Profile, benchmark, and optimize R code with profvis and bench.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/laurenoconnelllab/pTRAPPING --skill r-performance-laurenoconnelllab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: r-performance
Source: https://github.com/laurenoconnelllab/pTRAPPING/tree/main/.claude/skills/r-performance
Command: npx skills add https://github.com/laurenoconnelllab/pTRAPPING --skill r-performance-laurenoconnelllab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires profvis, bench, and includes scripts (resource) components.

What problem does it solve?

This Skill enhances R programming efficiency by providing best practices for profiling, benchmarking, and code optimization, reducing runtime and resource consumption.

Core Features & Use Cases

  • Performance Profiling: Utilize tools like profvis and Rprof to identify bottlenecks in R scripts.
  • Benchmarking: Compare different approaches using bench::mark() to select the most efficient method.
  • Optimization Strategies: Apply techniques such as vectorization and parallel processing to improve code speed.
  • Use Case: Example tasks include profiling a large data analysis pipeline to identify slow steps and benchmarking different algorithms for speed gains.

Quick Start

Profile your R code with profvis to identify bottlenecks and optimize key functions for faster execution.

Frequently Asked Questions about r-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find bottlenecks in R code using profiling?▼

To find bottlenecks in R code, use profvis to profile scripts and identify slow functions. This visualizes execution time and memory usage to pinpoint performance issues.

What is the best way to benchmark different R functions for speed?▼

Benchmarking R functions is best done using bench::mark(). It compares multiple approaches simultaneously, providing precise timing and memory allocation results to select the most efficient method.

Can I use parallel processing to optimize large data analysis pipelines in R?▼

Yes, parallel processing techniques optimize large data analysis pipelines in R. By distributing tasks across cores, you reduce runtime and improve resource efficiency for statistical modeling workflows.

When do I need to optimize R scripts for performance?▼

Optimize R scripts when runtimes become slow or resource consumption is high. Profiling and benchmarking are needed for data analysis, statistical modeling, and package development workflows.

Does profvis work with existing R scripts for performance profiling?▼

Yes, profvis works with existing R scripts for performance profiling. It records execution and visualizes bottlenecks without requiring code rewrites, helping identify slow steps quickly.