Generate comprehensive R tutorials for specialized applications including health economics (CEA), qualitative research, signal processing, and environmental epidemiology. Creates domain-specific tutorials with theory, practice workflow, and proper terminology. Handles TreeAge, text mining, wavelet, VMD, DLNM, WQS, BKMR methods.
Generate comprehensive R tutorials for specialized domain applications with proper academic structure, terminology, and visual assets.
This skill creates detailed R tutorials (.rmd/.qmd files) for specialized applications including:
Each tutorial follows a "Domain Background → Terminology → Theory → Practice → Interpretation" workflow with minimum 300 lines of content.
**Read Template Structure:**
**Create Tutorial File:**
Create `doc/[number]-[topic].rmd` with the following structure:
1. **YAML Frontmatter**: Include title, subtitle, author, date, output format
2. **Domain Background**: Explain the application domain and its importance
3. **Core Concepts**: Define key terms with Chinese-English bilingual terminology
4. **Method Theory**: Explain the statistical/computational principles
5. **Detailed Practice**: Provide step-by-step R code workflow (30% of content)
6. **Domain Interpretation**: Interpret results from domain perspective (clinical significance, policy implications)
7. **Ethical Considerations**: Address data ethics where applicable
8. **Reporting Standards**: Reference domain-specific reporting guidelines
**Content Requirements:**
**Generate Cover Image (MANDATORY):**
Create `doc/images/[number]-[topic]-cover.svg` following visual templates
**Generate Diagram Images (if needed):**
For complex logic or structures that code cannot easily demonstrate, create `doc/images/diagrams/stat-[topic].svg` (or .png) using AI image generation. Reference in markdown using standard image syntax.
Before committing, validate that the tutorial renders correctly:
```bash
quarto render doc/[number]-[topic].rmd
```
The new article will not appear on the website sidebar or category pages unless these steps are completed:
**1. Update `doc/_quarto.yml`:**
```yaml
- text: "Article Title"
href: "[number]-[topic].rmd"
```
**2. Update `doc/0001-guide.rmd`:**
```markdown
| [Topic Name] | [Article Title]([number]-[topic].html) | [Brief description] |
```
**3. Run Auto-Generation Script (MANDATORY):**
This script updates `sections/special.qmd` and other category index pages based on `_quarto.yml`:
```bash
workdir="doc" Rscript doc/generate_sections.R
```
**4. Update `README.md`:**
**Re-render Affected Pages:**
```bash
quarto render doc/sections/special.qmd
quarto render doc/index.qmd
```
**Commit Changes:**
```bash
git add doc/[number]-[topic].rmd doc/images/[number]-[topic]-cover.svg
git add doc/_quarto.yml doc/0001-guide.rmd README.md doc/sections/special.qmd
git commit -m "feat(spc): Add [domain-method] specialized application tutorial"
```
Before starting, read these reference documents in the `doc/references/` directory:
User: "Create a tutorial on cost-effectiveness analysis in health economics"
Agent should:
1. Read reference documents to understand structure and terminology
2. Generate comprehensive `doc/[number]-cea-health-economics.rmd` with 300+ lines
3. Create cover image `doc/images/[number]-cea-health-economics-cover.svg`
4. Validate rendering with `quarto render`
5. Update all navigation files (`_quarto.yml`, `0001-guide.rmd`, `README.md`)
6. Run `generate_sections.R` script
7. Re-render affected pages and commit all changes
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/r-specialized-applications-tutorial-generator/raw