Running R Analysis In Existing Projects
by @jackkuo666
Work inside an existing R project to extend analyses, modify scripts, run statistical models, update visualizations, and regenerate reports.
clawhub install running-r-analysis-in-existing-projectsπ About This Skill
name: running-r-analysis-in-existing-projects description: Work inside an existing R project to extend analyses, modify scripts, run statistical models, update visualizations, and regenerate reports.
Running R Analysis in Existing Projects
This skill operates inside an already structured R project. It helps extend, debug, or enhance existing analyses without recreating the project from scratch.
Use this skill when the user wants to:
What This Skill Does
When activated, this skill will:
1. Understand the project structure
- Detect folders like data/, scripts/, results/, reports/
- Identify .Rproj, .Rmd, .qmd, or .R files
2. Inspect existing analysis - Read current scripts and reports - Identify which packages and methods are being used - Avoid rewriting working components unnecessarily
3. Extend or modify analysis
- Add new models or statistical tests
- Introduce new plots using ggplot2
- Add new data processing steps
- Improve code structure or reproducibility
4. Re-run and update outputs
- Recompute results
- Overwrite or version new outputs in results/
- Re-render R Markdown or Quarto reports
5. Debug issues - Fix missing packages - Resolve file path problems - Handle common R errors and warnings
Example User Requests That Should Trigger This Skill
Example Workflow
User: Add a logistic regression model and update the report.
Skill actions:
glm()results/Tools & Packages Commonly Used
| Purpose | R Packages | |--------|------------| | Data wrangling | tidyverse, dplyr | | Modeling | stats, lme4, glmnet | | Visualization | ggplot2 | | Reporting | rmarkdown, quarto | | Project management | here, renv |