Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

writing-tidyverse-r写 tidyverse r

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

445

周安装

18

GitHub Stars

55

下载量

140
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:writing-tidyverse-r(写 tidyverse r)
来源仓库:https://github.com/jeremy-allen/claude-skills
仓库路径:skills/writing-tidyverse-r
安装命令:
npx skills add https://github.com/jeremy-allen/claude-skills --skill writing-tidyverse-r
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremy-allen/claude-skills --skill writing-tidyverse-r

简介

用于辅助文档、README、Markdown 和内容稿件的整理与改写。

  • 适合提炼结构、补齐章节、统一术语或检查链接,提升内容可读性。
  • 使用时应保留项目已有事实和路径,避免写成确定结论;对外文案需注意语气控制。
  • 安装命令:npx skills add https://github.com/jeremy-allen/claude-skills --skill writing-tidyverse-r。
  • 支持 Codex、Claude、Cursor、Gemini CLI,通过 GitHub 仓库安装。

SKILL.md

Writing Tidyverse R

This skill covers modern tidyverse patterns for R 4.3+ and dplyr 1.1+, style guidelines, and migration from legacy patterns.

Core Principles

  1. Use modern tidyverse patterns - Prioritize dplyr 1.1+ features, native pipe, and current APIs
  2. Write readable code first - Optimize only when necessary
  3. Follow tidyverse style guide - Consistent naming, spacing, and structure

Pipe Usage

Always use native pipe |> instead of magrittr %>%

R 4.3+ provides all needed features. See pipe-examples.md for usage patterns.

Join Syntax (dplyr 1.1+)

Use join_by() instead of character vectors for joins

Modern join syntax supports:

  • Equality joins: join_by(company == id)
  • Inequality joins: join_by(company == id, year >= since)
  • Rolling joins: join_by(company == id, closest(year >= since))

See join-examples.md for complete patterns.

Multiple Match Handling

Use multiple and unmatched arguments for quality control:

  • multiple = "error" - Expect 1:1 matches
  • multiple = "all" - Allow multiple matches explicitly
  • unmatched = "error" - Ensure all rows match

Data Masking vs Tidy Selection

Understand the difference:

  • Data masking functions: arrange(), filter(), mutate(), summarise()
  • Tidy selection functions: select(), relocate(), across()

Key patterns:

  • Use {{}} (embrace) for function arguments
  • Use .data[[]] for character vectors
  • Use across() for multiple columns

See data-masking-examples.md for patterns.

Modern Grouping and Column Operations

Use .by for per-operation grouping (dplyr 1.1+)

This replaces the old group_by() |>... |> ungroup() pattern.

Additional modern operations:

  • pick() - Column selection inside data-masking functions
  • across() - Apply functions to multiple columns
  • reframe() - Multi-row summaries

See grouping-examples.md for complete examples.

String Manipulation with stringr

Use stringr over base R string functions

Benefits:

  • Consistent str_ prefix
  • String-first argument order
  • Pipe-friendly and vectorized

See stringr-examples.md for common patterns and base R equivalents.

Style Guide Essentials

Object Names

  • Use snake_case for all names
  • Variable names = nouns, function names = verbs
  • Avoid dots except for S3 methods

Good: day_one, calculate_mean, user_data Avoid: DayOne, calculate.mean, userData

Spacing and Layout

See style-examples.md for proper spacing and pipe formatting.

Naming and Arguments

  • Use snake_case for variables and functions
  • Prefix non-standard arguments with . (e.g., .data, .by)

Anti-Patterns to Avoid

Legacy Patterns

AvoidUse Instead
%>%`
by = c("a" = "b")by = join_by(a == b)
sapply()map_*()
`group_by()>...

Performance Anti-Patterns

  • Don't grow objects in loops - Pre-allocate or use purrr
  • Don't use sapply() - Type-unstable, use map_*() instead

See anti-patterns.md for examples of what to avoid and correct alternatives.

Migration Reference

Base R to Modern Tidyverse

Base RModern Tidyverse
subset(data, condition)filter(data, condition)
data[order(data$x),]arrange(data, x)
aggregate(x ~ y, data, mean)summarise(data, mean(x),.by = y)
sapply(x, f)map(x, f)
grepl("pattern", text)str_detect(text, "pattern")
gsub("old", "new", text)str_replace_all(text, "old", "new")

Old to New Tidyverse Patterns

Old PatternNew Pattern
data %>% function()`data
`group_by(x)> summarise()
by = c("a" = "b")by = join_by(a == b)
gather()/spread()pivot_longer()/pivot_wider()
map_dfr(x, f)`map(x, f)
separate(col, into =...)separate_wider_delim()

See migration-examples.md for complete migration patterns.

source: Sarah Johnson's gist https://gist.github.com/sj-io/3828d64d0969f2a0f05297e59e6c15ad

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.05%
按下载量换算56

Claude

28.15%
按下载量换算39

Cursor

18.92%
按下载量换算26

Gemini CLI

10.64%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills