A ready-to-edit report for students learning to combine writing, R analysis, figures, tables, citations, and cross-references. QuartoTemplate.qmd renders using built-in R data, so you can inspect a complete report before adding your own files.
-
Download the repository as a ZIP from GitHub (Code → Download ZIP) and extract it, or clone it with Git. Keep all the files together.
-
Install Quarto and R. RStudio or Positron provides a Render button, but any editor plus a terminal will work.
-
Open
QuartoTemplate.qmdand click Render, or run this from the project folder:quarto render QuartoTemplate.qmd --to html
-
Open the resulting HTML file. Compare it with the
.qmdsource to see how prose, R code, output, and references connect. -
Change the title and author in the YAML header. Replace the example question, data, analysis, results, and discussion with your own work. Render again after each substantial change.
The exampleoutputfiles folder contains the current template rendered as HTML, PDF, and Word. The image file in that folder is a resource copied by Quarto. Use these examples to compare the output formats and check what your own render should produce.
To update all three examples after editing the source, run these commands from the project folder:
quarto render QuartoTemplate.qmd --to html --output-dir exampleoutputfiles --no-clean
quarto render QuartoTemplate.qmd --to pdf --output-dir exampleoutputfiles --no-clean
quarto render QuartoTemplate.qmd --to docx --output-dir exampleoutputfiles --no-cleanIf rendering fails, run quarto check to see whether Quarto can find R. If knitr is missing, run install.packages("knitr") in R. Keep the project folder together when moving it between computers.
| File | Purpose |
|---|---|
QuartoTemplate.qmd |
The report source to edit and render |
biblio.bib |
Example BibTeX references; add your own and cite their keys with @key |
mee.csl |
Citation style used by the example |
_quarto.yml |
Project name |
template_4_quarto_report.Rproj |
Optional RStudio project file |
rmdbook.jpg |
Example image used in the report |
README_Quarto.txt |
Short plain-text instructions |
- State a specific question. Explain where your data came from, what one row represents, units, missing values, and exclusions.
- Put data in a
data/folder and read it with relative paths, for exampleread.csv("data/measurements.csv"). Never include private or confidential data in a public GitHub repository. - Describe the method before the result. Caption and refer to figures and tables; report estimates with units; discuss uncertainty and limitations.
- Add sources to
biblio.biband cite them as@citation-key. Keep citations beside the claims they support. - Document software and package versions when they matter to reproducing your work. Set a random seed before using random numbers.
- Follow your course's rules for collaboration and AI assistance. Check generated code and text yourself, and disclose assistance when required.
The example uses only built-in R data and functions plus knitr, which Quarto uses to run R chunks. Add packages and external data as your project needs them, and document those requirements for the next reader.
HTML is easiest for first use and supports a table of contents and foldable code. The same source also has PDF and Word settings:
quarto render QuartoTemplate.qmd --to pdf
quarto render QuartoTemplate.qmd --to docxPDF output needs a TeX installation; see Quarto's PDF guide. HTML features such as foldable code do not carry over to PDF or Word.
The older R Markdown version remains available for reference.