{
  "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": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/r",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=r",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/r",
    "agentPageUrl": "https://openagent3.xyz/skills/r/agent",
    "manifestUrl": "https://openagent3.xyz/skills/r/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/r/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Vectorization",
        "body": "Loops are slow — use apply(), lapply(), sapply(), or purrr::map()\nVectorized functions operate on whole vectors — sum(x) not for (i in x) total <- total + i\nifelse() is vectorized — if is not, use ifelse() for vector conditions\nColumn operations faster than row — R is column-major"
      },
      {
        "title": "Indexing Gotchas",
        "body": "R is 1-indexed — first element is x[1], not x[0]\nx[0] returns empty vector — not error, silent bug\nNegative index excludes — x[-1] removes first element\n[[ extracts single element — [ returns subset (list stays list)\ndf[, 1] drops to vector — use df[, 1, drop = FALSE] to keep data frame"
      },
      {
        "title": "NA Handling",
        "body": "NA propagates — 1 + NA is NA, NA == NA is NA\nUse is.na() to check — not x == NA\nMost functions need na.rm = TRUE — mean(x) returns NA if any NA present\nna.omit() removes rows with any NA — may lose data unexpectedly\ncomplete.cases() returns logical vector — rows without NA"
      },
      {
        "title": "Factor Traps",
        "body": "Old R converted strings to factors by default — use stringsAsFactors = FALSE or modern R\nlevels() shows categories — but factor values are integers internally\nAdding new value not in levels gives NA — use factor(x, levels = c(old, new))\nas.numeric(factor) gives level indices — use as.numeric(as.character(factor)) for values\nDropping unused levels: droplevels() — or factor() again"
      },
      {
        "title": "Recycling",
        "body": "Shorter vector recycled to match longer — c(1,2,3) + c(10,20) gives 11, 22, 13\nNo error if lengths aren't multiples — just warning, easy to miss\nSingle values recycle intentionally — x + 1 adds 1 to all elements"
      },
      {
        "title": "Data Frames vs Tibbles",
        "body": "Tibble never converts strings to factors — safer defaults\nTibble never drops dimensions — df[, 1] stays tibble\nTibble prints better — shows type, doesn't flood console\nas_tibble() to convert — from tibble or dplyr package"
      },
      {
        "title": "Assignment",
        "body": "<- is idiomatic R — = works but avoided in style guides\n<<- assigns to parent environment — global assignment, usually a mistake\n-> right assignment exists — rarely used, confusing"
      },
      {
        "title": "Scope",
        "body": "Functions look up in parent environment — can accidentally use global variable\nLocal variable shadows global — same name hides outer variable\nlocal() creates isolated scope — variables don't leak out"
      },
      {
        "title": "Common Mistakes",
        "body": "T and F can be overwritten — use TRUE and FALSE always\n1:length(x) fails on empty x — gives c(1, 0), use seq_along(x)\nsample(5) vs sample(c(5)) — different! first gives 1:5 permutation\nString splitting: strsplit() returns list — even for single string"
      }
    ],
    "body": "Vectorization\nLoops are slow — use apply(), lapply(), sapply(), or purrr::map()\nVectorized functions operate on whole vectors — sum(x) not for (i in x) total <- total + i\nifelse() is vectorized — if is not, use ifelse() for vector conditions\nColumn operations faster than row — R is column-major\nIndexing Gotchas\nR is 1-indexed — first element is x[1], not x[0]\nx[0] returns empty vector — not error, silent bug\nNegative index excludes — x[-1] removes first element\n[[ extracts single element — [ returns subset (list stays list)\ndf[, 1] drops to vector — use df[, 1, drop = FALSE] to keep data frame\nNA Handling\nNA propagates — 1 + NA is NA, NA == NA is NA\nUse is.na() to check — not x == NA\nMost functions need na.rm = TRUE — mean(x) returns NA if any NA present\nna.omit() removes rows with any NA — may lose data unexpectedly\ncomplete.cases() returns logical vector — rows without NA\nFactor Traps\nOld R converted strings to factors by default — use stringsAsFactors = FALSE or modern R\nlevels() shows categories — but factor values are integers internally\nAdding new value not in levels gives NA — use factor(x, levels = c(old, new))\nas.numeric(factor) gives level indices — use as.numeric(as.character(factor)) for values\nDropping unused levels: droplevels() — or factor() again\nRecycling\nShorter vector recycled to match longer — c(1,2,3) + c(10,20) gives 11, 22, 13\nNo error if lengths aren't multiples — just warning, easy to miss\nSingle values recycle intentionally — x + 1 adds 1 to all elements\nData Frames vs Tibbles\nTibble never converts strings to factors — safer defaults\nTibble never drops dimensions — df[, 1] stays tibble\nTibble prints better — shows type, doesn't flood console\nas_tibble() to convert — from tibble or dplyr package\nAssignment\n<- is idiomatic R — = works but avoided in style guides\n<<- assigns to parent environment — global assignment, usually a mistake\n-> right assignment exists — rarely used, confusing\nScope\nFunctions look up in parent environment — can accidentally use global variable\nLocal variable shadows global — same name hides outer variable\nlocal() creates isolated scope — variables don't leak out\nCommon Mistakes\nT and F can be overwritten — use TRUE and FALSE always\n1:length(x) fails on empty x — gives c(1, 0), use seq_along(x)\nsample(5) vs sample(c(5)) — different! first gives 1:5 permutation\nString splitting: strsplit() returns list — even for single string"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/r",
    "publisherUrl": "https://clawhub.ai/ivangdavila/r",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}