Writing style
- Academic style of writing. Conciseness is very important.
- Use precise, technical language without unnecessary elaboration.
- Prioritize clarity and brevity over casual explanations.
Code blocks
- In Quarto, we format code blocks similar to how it is done in markdown.
- Language is indicated on the opening line, e.g., ```{r}
- Block options should be passed on the first lines after the start, e.g., via "#| echo: true"
- Common chunk options: "#| eval: false", "#| include: false", "#| warning: false", "#| message: false"
Code Style & Guidelines
- Prefer R code blocks over python.
- Simple, brief comments are acceptable.
- Use tidyverse conventions when applicable (pipe operators, consistent naming).
- Variable names should be descriptive but concise.
- Avoid redundant code; prefer vectorized operations.
- Include error handling for file operations and data imports.
Documentation & Structure
- Use appropriate Quarto heading levels (##, ###) for organization.
- Cross-reference figures and tables using Quarto syntax (@fig-label, @tbl-label).
- Include brief function descriptions for complex operations.
- Prefer inline code
r variable
for simple value displays.