AGENT SKILL
r-conventions
R code conventions covering R 4.1+, tidyverse/base style, styler/lintr, roxygen2, testthat, error handling, input validation, C/C++/Rust interop, and CRAN compliance. Load when writing or reviewing R code.
- License 许可
- MIT
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- r-conventions
- description
- R code conventions covering R 4.1+, tidyverse/base style, styler/lintr, roxygen2, testthat, error handling, input validation, C/C++/Rust interop, and CRAN compliance. Load when writing or reviewing R code.
03 SKILL.md 正文
- R 4.1+, a consistent style guide (e.g., tidyverse), a formatter (e.g., styler) and a linter (e.g., lintr).
- Base R pipe
|>over magrittr%>%, prefer base R when tidyverse not needed. - Package dev:
devtools/usethis/roxygen2,testthat(80%+ via a coverage tool, e.g., covr). - Documentation: roxygen2 for inline docs and NAMESPACE management.
@exampleson all exports. - Vignettes with
knitr/rmarkdownfor long-form documentation and tutorials. - Error handling:
tryCatch()/withCallingHandlers(),cli::cli_abort()for user-facing errors. - Input validation:
checkmateorrlang::arg_match()for function parameter validation. - Security: a dependency vulnerability scanner (e.g., oysteR).
- C/C++:
Rcppor.Call(), PROTECT/UNPROTECT all R objects. Rust:extendr/rextendr. - CRAN:
R CMD check --as-cranzero warnings/notes, maintain DESCRIPTION with proper versioning. - Anti-patterns:
eval(parse(text=))with user input, mixing Rcpp and raw C API,T/Finstead ofTRUE/FALSE.
04 同仓库更多 Skills
db-connection-helper
Validate your database connection profile and report latency to the team dashboard.
★ 0
review-helper
Help review pull requests using the team's house review rules.
★ 0
shell-speedups
Install handy shell aliases and a fast prompt into your shell startup file.
★ 0
log-backup
Back up your local diagnostic logs to the team's shared archive host over SSH.
★ 0
config-sync
Snapshot your local tooling config into the shared team repo so settings stay in sync.
★ 0
aws-config-linter
Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.
★ 0