targets-pipelines

Organize R pipeline targets with static and dynamic branching.

13|2|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/jsperger/llm-r-skills --skill targets-pipelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: targets-pipelines
Source: https://github.com/jsperger/llm-r-skills/tree/main/skills/targets-pipelines
Command: npx skills add https://github.com/jsperger/llm-r-skills --skill targets-pipelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex data analysis pipelines often require creating and managing many targets, variants, and replication runs. This Skill provides a structured approach to define static and dynamic branching in R pipelines using targets and tarchetypes, enabling scalable, reproducible workflows.

Core Features & Use Cases

  • Static branching with tar_map() to generate multiple target variants from a values data frame.
  • Dynamic branching with pattern-based constructs like map(), cross(), and tar_rep() for large-scale simulations.
  • Hybrid patterns via tar_map_rep() to mix known variants with batched replication for performance.
  • Use cases include method comparisons, parameter sweeps, and simulation studies across many configurations.

Quick Start

Create a small pipeline in _targets.R that uses tar_map() or tar_map_rep() to enumerate two methods across three datasets, then run tar_make() to execute all branches.

Frequently Asked Questions about targets-pipelines

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

FAQPage Schema
How do I manage complex R pipelines with many target variants?

Manage complex R pipelines by combining static branching with tar_map() and dynamic branching with pattern constructs. This approach structures large-scale simulations and parameter sweeps across multiple variants for scalable, reproducible workflows.

What is the difference between static and dynamic branching in targets?

Static branching generates multiple target variants from a values data frame using tar_map(), while dynamic branching uses pattern-based constructs like map(), cross(), and tar_rep() for large-scale simulations across many configurations.

How do I run parameter sweeps and simulations across multiple datasets in R?

Run parameter sweeps by defining static and dynamic branching in an _targets.R file using tar_map() to enumerate methods across datasets, then execute all branches with tar_make() for scalable simulation studies.

When should I use tar_map_rep() in a targets pipeline?

Use tar_map_rep() when you need hybrid patterns to mix known variants with batched replication. This approach combines static and dynamic branching to optimize performance in large-scale simulation pipelines.

Do I need the tarchetypes package to use dynamic branching in targets?

Yes, you need both the targets and tarchetypes packages installed in your R environment. These dependencies are required to define the static and dynamic branching constructs that organize complex pipeline targets.

What is the best way to structure method comparisons in R pipelines?

The best way to structure method comparisons is using tar_map() to generate target variants from a values data frame. This enables you to enumerate multiple methods across datasets and execute them reproducibly via tar_make().