This exercise builds on the previous exercises where you learnt to create a simple MS Word report ⭐ and to add dynamic elements to your report ⭐⭐. Mastering these two exercises is essential for successfully completing the current exercise.
1 Objectives 🎯
- If you have generated the MS Word report with dynamic elements as instructed in Exercise 4, continue working on the same Quarto notebook you already modified. Otherwise, download the files
df1.RData,df2.RData,exercise5.qmd,swisstph_template.docx, andmy_biblio.bibusing the links provided on the right-hand side of this page. For simplicity, please put these two files under the same folder and open the Quarto notebook in RStudio. - Complete each of the following tasks and render the document after each task or set of tasks to track your progress.
2 Use Quarto in a terminal
quarto render exercise5.qmd
quarto render exercise5.qmd -o exercise5_report1.docx
Tip
- You can access the RStudio terminal in the
Terminaltab immediately to the right of theConsoletab:
- If the terminal tab is not visible, go to Tools > Terminal > Move Focus to Terminal
3 Parametrise your report
quarto render exercise5.qmd -o exercise5_report_df1.docx -P dataset:df1.RData
Tip
ImportantDiscussion question
Discuss the advantages and disadvantages of using R within Quarto compared to using R scripts.
Reuse
CC-BY