# Send R to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "r",
    "name": "R",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/r",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/r",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/r",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=r",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "r",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T20:12:57.060Z",
      "expiresAt": "2026-05-14T20:12:57.060Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=r",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=r",
        "contentDisposition": "attachment; filename=\"r-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "r"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/r"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/r",
    "downloadUrl": "https://openagent3.xyz/downloads/r",
    "agentUrl": "https://openagent3.xyz/skills/r/agent",
    "manifestUrl": "https://openagent3.xyz/skills/r/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/r/agent.md"
  }
}
```
## Documentation

### Vectorization

Loops are slow — use apply(), lapply(), sapply(), or purrr::map()
Vectorized functions operate on whole vectors — sum(x) not for (i in x) total <- total + i
ifelse() is vectorized — if is not, use ifelse() for vector conditions
Column operations faster than row — R is column-major

### Indexing Gotchas

R is 1-indexed — first element is x[1], not x[0]
x[0] returns empty vector — not error, silent bug
Negative index excludes — x[-1] removes first element
[[ extracts single element — [ returns subset (list stays list)
df[, 1] drops to vector — use df[, 1, drop = FALSE] to keep data frame

### NA Handling

NA propagates — 1 + NA is NA, NA == NA is NA
Use is.na() to check — not x == NA
Most functions need na.rm = TRUE — mean(x) returns NA if any NA present
na.omit() removes rows with any NA — may lose data unexpectedly
complete.cases() returns logical vector — rows without NA

### Factor Traps

Old R converted strings to factors by default — use stringsAsFactors = FALSE or modern R
levels() shows categories — but factor values are integers internally
Adding new value not in levels gives NA — use factor(x, levels = c(old, new))
as.numeric(factor) gives level indices — use as.numeric(as.character(factor)) for values
Dropping unused levels: droplevels() — or factor() again

### Recycling

Shorter vector recycled to match longer — c(1,2,3) + c(10,20) gives 11, 22, 13
No error if lengths aren't multiples — just warning, easy to miss
Single values recycle intentionally — x + 1 adds 1 to all elements

### Data Frames vs Tibbles

Tibble never converts strings to factors — safer defaults
Tibble never drops dimensions — df[, 1] stays tibble
Tibble prints better — shows type, doesn't flood console
as_tibble() to convert — from tibble or dplyr package

### Assignment

<- is idiomatic R — = works but avoided in style guides
<<- assigns to parent environment — global assignment, usually a mistake
-> right assignment exists — rarely used, confusing

### Scope

Functions look up in parent environment — can accidentally use global variable
Local variable shadows global — same name hides outer variable
local() creates isolated scope — variables don't leak out

### Common Mistakes

T and F can be overwritten — use TRUE and FALSE always
1:length(x) fails on empty x — gives c(1, 0), use seq_along(x)
sample(5) vs sample(c(5)) — different! first gives 1:5 permutation
String splitting: strsplit() returns list — even for single string
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ivangdavila
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T20:12:57.060Z
- Expires at: 2026-05-14T20:12:57.060Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/r)
- [Send to Agent page](https://openagent3.xyz/skills/r/agent)
- [JSON manifest](https://openagent3.xyz/skills/r/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/r/agent.md)
- [Download page](https://openagent3.xyz/downloads/r)