Skills Plugins MCP Prompt Model 博客 我的中心

r-collapse

Use when code loads or uses collapse (library(collapse), collapse::), performing fast grouped or weighted statistics in R, or seeking faster alternatives to dplyr aggregation

DeepseekModel キュレーション済みスキル 品質 良好 · 64 v1.0.0

取得

https://deepseekmodel.com/api/download.php?id=arthurgailes-r-package-skills-skills-r-collapse-skill-md&format=skill
ダウンロード .skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能
.skill ファイルの system_prompt フィールドの実際の内容。
name r-collapse description Use when code loads or uses collapse (library(collapse), collapse::), performing fast grouped or weighted statistics in R, or seeking faster alternatives to dplyr aggregation collapse: Fast Data Transformation Overview collapse provides C/C++-based high-performance grouped and weighted statistics. 50-100x faster than dplyr for grouped operations, matches data.table speed while working with any data frame type (tibbles, data.tables, xts). Core principle: Fast aggregation, transformation, and panel data operations through vectorized C code. References Read references/API.md before writing code. references/API.md - Complete function reference references/collapse-for-tidyverse-users.md - Migration guide and patterns references/collapse-documentation.md - Core concepts and usage references/collapse-and-sf.md - Working with spatial data references/collapse-object-handling.md - Data structure handling When to Use Use collapse when: Dataset >100k rows Weighted statistics required Panel data (between/within transformations) Time series lags/diffs/growth rates Performance bottleneck in dplyr pipeline Don't use: Small datasets (<10k rows) - dplyr is clearer Need arbitrary grouped functions (use dplyr) Working with sf (use sf and dplyr) Need reference semantics/in-place modification (use data.table) Complex joins (data.table's keyed/rolling/non-equi joins better) vs Alternatives: Scenario Use This Large grouped stats collapse Weighted computations collapse sf manipulation dplyr Reference semantics data.table Complex joins data.table Arbitrary group functions dplyr Quick Reference Task Function/Example Grouped stats fmean() , fsum() , fsd() , fmedian() Aggregation collap(df, ~ by, list(fmean, fsd)) Transform ftransform() , fmutate() Selection fselect() , fsubset() (~100x faster) Time series flag() , fdiff() , fgrowth() Panel data fwithin() , fbetween() , qsu() Grouping fgroup_by() , GRP() Core Pattern library ( collapse ) # Basic: grouped mean (50-100x faster than dplyr) data |> fgroup_by ( category ) |> fmean ( ) # Weighted aggregation data |> fgroup_by ( region ) |> fmean ( w = weight_col ) # Multiple stats at once collap ( data , ~ category , list ( fmean , fsd , fmedian ) ) # TRA transformations (key differentiator - single C pass) data |> fgroup_by ( id ) |> fmean ( TRA = "-" ) # Demean: subtract group mean data |> fgroup_by ( id ) |> fsd ( TRA = "/" ) # Scale: divide by group SD data |> fgroup_by ( id ) |> fmean ( TRA = "fill" ) # Fill: replace NA with group mean # See references/API.md for full TRA options ("-", "/", "fill", "-+", "replace") Common Mistakes Mistake Fix Using group_by() with collapse functions Use fgroup_by() or pass g = GRP(groupvar) collap() applies to ALL numeric columns Explicitly select columns before calling Expecting na.rm = FALSE default collapse defaults to na.rm = TRUE fwithin() / fbetween() collapse rows They return same # rows (centered/group means) Global options affect behavior Set arguments explicitly in package code Ignoring sort = FALSE speedup Add sort = FALSE when order doesn't matter (3x faster) Advanced See references/ for API reference, vignette content (tidyverse comparison, sf integration, object handling, development guidelines), and panel data patterns. Validator: lib/r-validators/numerical-validator.R Resources: Docs
このスキルを起動するキーワード。クリックでコピーできます。

このスキルにはトリガーワードがありません。

ダウンロードした .skill に含まれるフィールド。
フィールド 説明
formatフォーマット識別子(skill/v1)
skill_idスキル固有 ID
nameスキル名
versionバージョン
description説明
categoryカテゴリ(配列)
trigger_wordsトリガーワード
tagsタグ
sourceソース
source_urlソース URL(本ページ)
exported_atエクスポート日時(ダウンロード毎)
system_promptシステムプロンプト本文
model_configモデル設定:provider / model / temperature / max_tokens / top_p
examplesサンプル
install_guide各プラットフォームの導入説明(Coze / Dify / Claude / カスタム)
同じスキルを各プラットフォーム形式で出力できます。
.skill 標準形式。system_prompt と model_config を収録し、任意の Agent で利用可能 ダウンロード
.skillpro 拡張形式。scripts / tools / dependencies / hooks を含む ダウンロード
.json 純粋な JSON 出力。system_prompt とモデル設定のみ ダウンロード
Coze frontmatter 付き Markdown。Coze へのインポート用 ダウンロード
Dify Dify DSL。アプリ作成後にそのままインポート ダウンロード

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。