3  First Quarto Markdown .qmd

1. Announcing Quarto

  • Quarto is automatically installed when you install R-studio.
  • (optional) For R users who are used to Rmarkdown, here is some explanation of the differences and benefits of quarto compared to Rmarkdown.

2. Walk through the tutorial “Hello, Quarto” for RStudio

3. Walk through the tutorial Computations for RStudio (especially from the beginning through Code Folding section)

  1. quarto cheatsheet

(optional) 5. Chapter 28 Quarto: R for Data Science (2nd ed)

  1. We will use the Computations.qmd file you created as part of the tutorial in the readings to get some more practice/learn. We won’t actually turn the Computations file in. Change options in the yaml and code chunks of the Computations.qmd file:

    • Adjust the YAML so the rendered file has a title of “Computations”.

    • Add the following to the YAML so that the file will always print the date of its most recent rendering

      date: "`r format(Sys.time(), '%B %d, %Y')`"
    • Add the following code to the YAML so that the .md file will be kept at the time of rendering.

      execute:
        keep-md: true
      An `.md`

      An ‘.md’ file is essentially a text file with inserted links to the output that was created when knitr runs all the code chunks. .md files render nicely in GitHub so we can easily see each other’s work there. (The .qmd file is a text file with code chunks and doesn’t render well on GitHub, nor does the .html files). On ALL your assignments you need to add the code above to the YAML.

      Here is a video that explains a bit more about the importance of the .md file.

    • It is recommended that you turn off all the warnings in the reports you submit for this class. In the same way the Computations tutorial shows to turn “echo” to false, adjust Computations.qmd YAML so that no warnings are produced. (The code doesn’t throw any warnings to begin with, so you won’t see any change in the output).

    • Finally, add the following code to the YAML. Can you describe what changed?

      format:
        html:
          code-fold: true
          code-line-numbers: true
  2. Find three articles that use data and visualizations to answer a question

  3. While in the project for this class’ repository, start a new .qmd file. Edit what’s there by default to title the report “First_Quarto_File”. Put a link to each article you found in item 2 above in the .qmd file. Also, write a one-paragraph review of each article that answers the following questions:

    • What is unique or good about the visualization? List a few ideas.
    • What could be better? Identify at least one issue with the visualization.
Take time to play/experiment

Experiment/play with adding callouts or other text formatting in the visual editor of the file. Switch between the Visual Editor and the Source Editor so you can see what adjustments are being made to the code. Eventually you should be relatively comfortable making edits in visual or source editors.

  1. Add an R code chunk that contains the following code: plot(1:20);
  2. IMPORTANT: Adjust the YAML so that when you render this new .qmd file, the .md is also saved.
  3. Render the file you titled “First_Quarto_File” to .html. Push all the files and folders to GitHub that were created as a result. This will include your .md, .html, .qmd files and a folder probably titled “First_Quarto_File_files”.

Submission

In I-learn, submit the link to your First_Quarto_File.md file that is stored on GitHub.