This vignette demonstrates how to use Quarto (.qmd) files as vignettes in R packages. Quarto is the next-generation version of R Markdown, offering enhanced features and better integration with multiple programming languages.
Quarto offers several advantages over traditional R Markdown:
#| syntaxHere’s a basic example using the package:
Note
This is a callout block that highlights important information.
Tip
Quarto supports multiple types of callouts: note, tip, warning, important, and caution.
You can use the modern #| syntax for chunk options:
Figure 1: Example plot showing data distribution
Quarto has excellent support for mathematical equations using LaTeX syntax:
Inline equation: \(E = mc^2\)
Display equation:
\[ \bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i \]
| Feature | R Markdown | Quarto |
|---|---|---|
| YAML | Standard | Enhanced |
| Chunks | {r, option=value} |
#| option: value |
| Publishing | Good | Excellent |
| Cross-refs | Limited | Native |
Quarto vignettes provide a modern, feature-rich way to document R packages. They integrate seamlessly with documentation systems and offer enhanced capabilities for technical documentation.
For more information, see: