Generate comprehensive R tutorials for specialized applications including health economics (CEA), qualitative research, signal processing, and environmental epidemiology. Covers domain background, professional methods, complete workflows, and results interpretation with domain-specific terminology.
Generate comprehensive R tutorials for specialized applications with professional domain knowledge and complete analytical workflows.
This skill generates detailed R tutorials (.rmd/.qmd files) for specialized application domains including:
Each tutorial follows a "domain background → terminology → analytical framework → practical workflow → domain-specific interpretation" structure.
Use this skill when:
1. User requests domain-specific R tutorials for specialized applications
2. File names match the pattern `[number]-[topic].rmd` or `.qmd`
3. Keywords appear: TreeAge, CEA, cost-effectiveness, text mining, qualitative, wavelet, VMD, DLNM, WQS, BKMR, environmental epidemiology
4. Tutorial needs to combine statistical methods with domain-specific expertise
1. Confirm the specialized domain (e.g., "Health Economics CEA")
2. Identify core domain concepts, terminology, and methodological frameworks
3. Review `references/content-structure.md` for YAML frontmatter and section structure templates
4. Review `references/domain-terminology.md` for domain-specific terminology
Create the `.rmd` or `.qmd` file following this structure:
**Required Content (Minimum 300 lines, 70% text / 30% code):**
1. **Domain Background Section**
- Introduce the domain context (e.g., health economics, environmental health)
- Explain why specialized methods are needed
- Provide real-world applications and use cases
2. **Core Concepts & Terminology**
- List key terms with Chinese-English bilingual definitions
- Provide plain-language explanations for technical concepts
- Include domain-specific standards and guidelines
3. **Methodological Framework**
- Explain the theoretical foundation of the method
- Describe the analytical workflow step-by-step
- Include mathematical formulations when appropriate
4. **Practical Implementation**
- Provide complete, runnable R code examples
- Include data preparation, analysis, and visualization steps
- Add detailed code comments explaining each step
5. **Results Interpretation**
- Explain how to interpret statistical outputs from a domain perspective
- Provide examples of clinical significance, policy implications, or domain-specific insights
- Include guidance on reporting standards (e.g., CHEERS for CEA)
6. **Data Ethics & Best Practices** (if applicable)
- Address ethical considerations specific to the domain
- Mention relevant reporting guidelines and standards
Create a cover image using SVG format:
```bash
doc/images/[number]-[topic]-cover.svg
```
Refer to `references/visual-templates.md` for SVG template examples. The cover should visually represent the domain and methodology.
For complex logic, frameworks, or concepts that are difficult to express in code:
```bash
doc/images/diagrams/stat-[topic].svg # or .png
```
Use AI image generation for:
Reference images in the tutorial using standard markdown syntax:
```markdown

```
Before committing, validate that the tutorial renders correctly:
```bash
quarto render doc/[number]-[topic].rmd
```
Fix any errors before proceeding.
The tutorial will not appear on the website without these updates:
1. **Update `doc/_quarto.yml`:**
- Locate `sidebar` → `contents` → `特殊应用` section
- Add new entry with correct indentation:
```yaml
- text: "Tutorial Title"
href: "[number]-[topic].rmd"
```
2. **Update `doc/0001-guide.rmd`:**
- Add entry to the appropriate category table:
```markdown
| [Topic] | [Tutorial Title]([number]-[topic].html) | [Brief description] |
```
3. **Run auto-generation script (MANDATORY):**
```bash
# Run from project root directory
workdir="doc" Rscript doc/generate_sections.R
```
This script updates category index pages like `sections/special.qmd` based on `_quarto.yml`.
4. **Update `README.md`:**
- Add link under `🧭 内容导航` → `🛠️ 特殊应用` section
1. **Re-render affected pages:**
```bash
quarto render doc/sections/special.qmd
quarto render doc/index.qmd
```
2. **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"
```
**User Request:**
"Create a tutorial on cost-effectiveness analysis in health economics using R and TreeAge"
**Agent Actions:**
1. Read `references/content-structure.md` and `references/domain-terminology.md`
2. Generate `doc/0025-health-economics-cea.rmd` with:
- Introduction to health economics and CEA
- Terminology: ICER, QALY, WTP threshold (with Chinese translations)
- CEA methodology and decision tree frameworks
- R code for TreeAge integration, probabilistic sensitivity analysis
- Interpretation from health policy perspective
- CHEERS reporting checklist
3. Generate `doc/images/0025-health-economics-cea-cover.svg`
4. Generate `doc/images/diagrams/stat-cea-decision-tree.svg` for decision tree framework
5. Validate rendering with `quarto render doc/0025-health-economics-cea.rmd`
6. Update `_quarto.yml`, `0001-guide.rmd`, run `generate_sections.R`, update `README.md`
7. Re-render index 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-domain-tutorials/raw