# Build Modern R Code and Packages

R developers need current guidance for tidyverse, rlang, and package workflows. This skill provides focused patterns for readable, tested, and faster R code.

## Install

```bash
npx skillstore add codingkaiser/r-development
```

## Metadata

- Status: approved
- Slug: codingkaiser-r-development
- Skillstore revision: r1
- Version status: missing
- Tree hash: 814637b5ba253cea2f777941bf1a9746c8300aff706bfa4235ea8dd157362426
- Author: CodingKaiser
- GitHub username: CodingKaiser
- License: MIT
- Repository: https://github.com/CodingKaiser/claude-kaiser-skills/tree/main/r-development
- Ref: d11af420e07cd866fe39cfa937efef3223896c06
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 76
- Public page: https://skillstore.pages.dev/skills/codingkaiser-r-development
- Manifest: https://skillstore.pages.dev/api/skills/codingkaiser-r-development/manifest

## Capabilities

- Recommends modern tidyverse patterns, including native pipes, join\_by, and .by grouping.
- Explains rlang data-masking, embracing, injection, dynamic dots, and pronoun usage.
- Guides R performance work with profiling, benchmarking, vectorization, dtplyr, and parallel processing.
- Provides package development advice for dependencies, APIs, validation, testing, documentation, and style.
- Compares R object systems, including S3, S4, S7, R6, and vctrs.

## Use Cases

- Modernize analysis pipelines: Convert older R data workflows to native pipes, dplyr 1.1 joins, .by grouping, and type-stable purrr patterns.
- Design reusable package APIs: Plan exported functions, validation, documentation, tests, dependency choices, and tidy evaluation support for R packages.
- Improve slow R workflows: Choose profiling tools, benchmark alternatives, and select faster backends without sacrificing maintainability.

## Prompt Templates

### Update a tidyverse pipeline

```
Review this R data pipeline and suggest a clearer modern tidyverse version. Prefer native pipes, .by grouping, and current dplyr syntax.
```

### Write a tidy evaluation helper

```
Create an R helper function that accepts data-masked column arguments. Explain when to use embracing, .data, .env, and dynamic dots.
```

### Plan package structure

```
Help design an R package API for this feature. Cover dependencies, validation, tests, documentation, exported functions, and style concerns.
```

### Diagnose performance trade-offs

```
Analyze this slow R workflow and propose a profiling-first optimization plan. Compare vectorization, dtplyr, data.table, purrr, and parallel options.
```

## Limitations

- It is documentation-only and does not run R code or install packages by itself.
- It assumes users can verify examples in their own R environment.
- It focuses on modern tidyverse workflows and may not fit base R-only projects.
- It does not replace project-specific performance profiling or package review.

## Best Practices

- Profile realistic workloads before changing code for performance.
- Use modern tidyverse syntax when it improves clarity and reduces grouping mistakes.
- Validate public package APIs thoroughly and document tidy evaluation behavior.

## Anti Patterns

- Do not rewrite readable code for small speed claims without benchmark evidence.
- Do not use ambiguous data-masking names when .data or .env would be clearer.
- Do not add heavy dependencies unless they provide meaningful user value.

## Security Audit

- Audited at: 2026-07-06T07:47:25.97\+00:00
- Summary: All static findings were reviewed as false positives caused by Markdown code fences, R syntax, rlang pronouns, and documentation wording. No evidence of command execution, environment file access, prompt injection, obfuscation, or malicious intent was found.

## Stats

- Views: 428
- Downloads: 10
- Favorites: 0
- Popularity score: 0
