running-r-analysis-in-existing-projects
Work inside an existing R project to extend analyses, modify scripts, run statistical models, update visualizations, and regenerate reports.
Why use this skill?
Use the OpenClaw R Analysis skill to modify scripts, run statistical models, update visualizations, and regenerate reports within your existing R projects.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/jackkuo666/running-r-analysis-in-existing-projectsWhat This Skill Does
The running-r-analysis-in-existing-projects skill is a specialized agent designed to integrate seamlessly into your R development workflow. Unlike generic coding assistants, this skill understands the nuances of R project structures, specifically looking for .Rproj files, standard data/scripts/results/reports folder hierarchies, and dependencies managed by renv. When triggered, the agent performs a contextual analysis of your repository to ensure that new code additions or modifications maintain compatibility with your existing libraries and conventions. It handles the full lifecycle of an analysis task: from reading the current code base to identify existing plotting themes and statistical methods, to implementing new models using industry-standard packages like tidyverse, lme4, or glmnet, and finally re-rendering your reports (RMarkdown or Quarto) to reflect the updated data or logic.
Installation
To integrate this skill into your OpenClaw agent, use the following command in your terminal or command interface:
clawhub install openclaw/skills/skills/jackkuo666/running-r-analysis-in-existing-projects
Once installed, ensure your agent has read/write permissions for the target R project directories to allow for automatic file modification and report generation.
Use Cases
This skill is ideal for researchers, data scientists, and analysts who maintain long-term projects. Use this when you need to introduce a new hypothesis-testing framework to a legacy project, refresh outdated visualizations to meet new publication standards, or integrate fresh data into a multi-step analysis pipeline. It is particularly useful for teams working on collaborative projects where maintaining consistent file paths (using the here package) and reproducibility is paramount.
Example Prompts
- "I've added new variables to the raw CSV in the data folder; please update my main analysis script to include a correlation matrix and re-render the final report."
- "This R Markdown document is failing to compile due to a package conflict; please investigate the dependency graph and fix the script so the PDF exports correctly."
- "Extend the current analysis by adding a random-effects model using lme4, and summarize the findings in a new table within the project's summary report."
Tips & Limitations
To maximize the efficiency of this skill, ensure your R project uses the here package for file path management; this significantly improves the agent's ability to locate files across different operating systems. The skill is designed for incremental updates—avoid requesting total rewrites of large projects. Always verify that your renv.lock file is up to date before running the agent to prevent dependency resolution errors. Note that while the agent can execute code to verify results, it should not be used as a replacement for manual peer review of statistical models in sensitive scientific contexts.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-jackkuo666-running-r-analysis-in-existing-projects": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
Sci-Hub-Search
AI-powered tool for searching and downloading academic papers through Sci-Hub
debugging-r-environment-and-dependencies
Diagnose and fix R environment issues, including package installation failures, dependency conflicts, system library problems, renv errors, and Bioconductor version mismatches.
generating-publication-ready-figures-in-r
Transform standard ggplot2 figures into publication-quality visualizations matching Nature, Science, and other top journal styles with proper themes, colors, fonts, and export settings.
rstudio-research-agent
Interact with R and RStudio environments for scientific research tasks including creating projects, running analyses, managing dependencies, and generating publication-quality plots.
Semanticscholar Search Skill
Skill by jackkuo666