---
name: creating-r-research-projects
description: Set up a reproducible R research workspace, install required packages, run statistical or bioinformatics analysis, and generate publication-ready reports and visualizations.
---

# Creating R Research Projects

This skill helps create and manage a complete R-based research analysis workflow. It is designed for scientific computing, statistical modeling, bioinformatics, and data visualization tasks.

Use this skill when the user wants to:
- Analyze datasets using R
- Perform statistical tests or modeling
- Run bioinformatics or omics analysis in R
- Generate plots, figures, or reports
- Create a reproducible R project structure
- Install and manage R package dependencies

---

## What This Skill Does

When activated, this skill will:

1. **Create a structured R project**
   - `data/` for raw and processed data
   - `scripts/` for analysis code
   - `results/` for outputs
   - `reports/` for R Markdown or Quarto reports

2. **Set up environment**
   - Initialize `.Rproj` (if using RStudio)
   - Create `renv` environment for reproducibility
   - Install required CRAN/Bioconductor packages

3. **Generate analysis scripts**
   - Data loading and cleaning
   - Statistical analysis or modeling
   - Visualization with `ggplot2`
   - Save outputs (CSV, plots, model summaries)

4. **Create a report**
   - R Markdown / Quarto document
   - Includes methods, results, and figures
   - Render to HTML or PDF

---

## Example User Requests That Should Trigger This Skill

- "Use R to analyze this CSV and generate plots"
- "Run differential expression analysis in R"
- "Create a statistical report for this dataset"
- "Build an R project for microbiome analysis"
- "Fit a regression model in R and summarize results"

---

## Example Workflow

**User:** Analyze this gene expression dataset and produce figures.

**Skill actions:**
- Create project structure
- Install `tidyverse`, `DESeq2`, `ggplot2`
- Write analysis script
- Generate PCA plot and volcano plot
- Produce an HTML report

---

## Tools & Packages Commonly Used

| Purpose | R Packages |
|--------|------------|
| Data wrangling | tidyverse, data.table |
| Visualization | ggplot2, patchwork |
| Statistics | stats, lme4, survival |
| Bioinformatics | Bioconductor packages (DESeq2, edgeR, limma) |
| Reporting | rmarkdown, quarto |
| Reproducibility | renv |

---

## Notes

- Prefer reproducible workflows (`renv`, scripted analysis)
- Avoid interactive-only steps unless requested
- All outputs should be saved to files, not just printed to console


---
Source attribution: modbender
Original project: https://github.com/modbender/skill-library-mcp/blob/d9c8fe903b5b4e82237dbe8d0df8567783022e18/data/creating-r-research-projects/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2025 skill-library-mcp contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: modbender
Original project: https://github.com/modbender/skill-library-mcp/blob/d9c8fe903b5b4e82237dbe8d0df8567783022e18/data/creating-r-research-projects/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Education & Research, Product Management
Roles: Business Intelligence Analyst, Data Scientist, Market Research Analyst, Product Manager, Researcher
Specialties: API, Backend
Tools: Quarto, R, Rmarkdown
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 8db1378c92e60ee60b081f803a1a96af9143163433a91ce7b4c9e8970ae0fe4f
