r-coding
БесплатноБез исполняемых скриптовНе проверенSolve R-based actuarial exam questions (e.g. CS1B, CS2B) using R scripts
от FDU-INS★ 84 звезды на GitHubОб этом скилле
R Coding Skill
You are solving an R-based actuarial exam paper (e.g. CS1B, CS2B). These papers typically provide data files (e.g. .RData or .csv) and expect candidates to write R code to perform statistical analysis and output results.
Overview
Your workflow is:
- Identify data files (usually
.RDataor.csvinexams/<SUBJECT>/<SITTING>/) - Write R scripts for each question
- Run the scripts (if R is installed) to produce numerical answers
- Save outputs (plots, console output)
- Document your code and results in
attempt.md
Step 1 — Identify Data
Check the exam directory exams/<SUBJECT>/<SITTING>/ for data files.
.RData: Load usingload("path/to/file.RData").csv: Load usingread.csv("path/to/file.csv").txt: Load usingread.table("path/to/file.txt")
Step 2 — Write R Scripts
For each question, write a standalone R script that:
- Loads the data
- Performs the required analysis (summary stats, GLMs, time series, etc.)
- Prints the results
- Saves any required plots to
results/<MODEL>/<SUBJECT>/<SITTING>/
Template for an R script
# ── Load Data ───────────────────────────────────────────────────
# Adjust path as needed - use absolute paths or relative to execution dict
load("exams/<SUBJECT>/<SITTING>/data.RData")
# ── Perform Analysis ────────────────────────────────────────────
# Example: Linear Model
model <- lm(Y ~ X, data = my_data)
summary(model)
# Example: Plotting
png("results/<MODEL>/<SUBJECT>/<SITTING>/q1_plot.png")
plot(model)
dev.off()
# ── Print Results ───────────────────────────────────────────────
print(summary(model))
# Print specific values if needed
cat("Adj R-squared:", summary(model)$adj.r.squared, "\n")
Step 3 — Run Scripts
Run the script using Rscript and capture the output:
Rscript results/<MODEL>/<SUBJECT>/<SITTING>/q1_solution.R > results/<MODEL>/<SUBJECT>/<SITTING>/q1_output.txt
Note: If
Rscriptis not available, you should still write the correct R code in the script file and include it in your attempt, but explicitly state that you could not run it to verify the output.
Step 4 — Document in attempt.md
In attempt.md:
- Show the R code used.
- Paste the output (from the text file or your own analysis if unable to run).
- Embed plots using markdown image syntax:
. - Interpret the results as required by the question (e.g. "The p-value is < 0.05, so we reject H0...").
Common R Tasks for Actuarial Exams
- Linear Regression:
lm(y ~ x) - GLMs:
glm(y ~ x, family = poisson) - Time Series:
arima(x, order = c(1,0,1)) - Survival Analysis:
survfit(Surv(time, event) ~ 1) - Bootstrap: Use
sample() - Simulation:
rnorm(),rpois(), etc.
Установить r-coding в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл r-coding?
Solve R-based actuarial exam questions (e.g. CS1B, CS2B) using R scripts
Как установить скилл r-coding?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл r-coding запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic