Skip to main content

Section 10.7 Extras

As stated many times in this book, there are a bevy of things possible in Rβ€”and Quarto is no different. Here are a couple of additions you can add to your Quarto document to spice it up.
Mind you, there are more additions you can add to your Quarto document even relating to the sections below. This is just meant to be an introduction.

Subsection 10.7.2 Pictures

In SubsectionΒ 2.5.3, I showed you all a picture of an Adelie penguin. Below is the code I used to display the image:
![A picture of an Adelie penguin.](Adelie-Screenshot.png)
The formula for this goes:
  • !: Letting R know that you’re about to add a picture.
  • []: Providing a description for the picture for people unable to see the picture.
  • (): The link to the picture.
    • The image needs to live in the same part of your computer that your Quarto document lives.

Subsection 10.7.3 Checklists

In most of the chapters in the textbook, a checklist at the end is provided. This is to help you along your analyses to make sure you’re hitting all of the major components of the analysis.
To create a checklist, is it quite similar to how to create lists. Below is an example:
- [ ] Identified both variables as **categorical** (not numeric)?
There is still a -, followed by a space. However, after the space is [] with a space separating the two brackets. This space is so you can click inside the checkbox.

Subsection 10.7.4 Standout Sections

There are times where you may want specific text to stand out. In this book, an example (and my favorite), stemming all the way from chapter 1, is:
R puts the r in Artist.
To do this, all you need is the > on its own line. The code looks like this:
> R puts the r in Artist.
Simple as that! This can be a vital addition when used correctly.

Subsection 10.7.5 Callout Boxes

Throughout this book, there have been many callout boxes. These typically have been with tips, notes, and sometimes even warnings. Here is an example of the first ever one found back in chapter 1:

Data is art, and as you will read many times in this book:.

R puts the r in Artist.
Below is the code on how to create them. It starts with ::: and ends with :::,
::: {.callout-tip}
## Data is art, and as you will read many times in this book:
R puts the **r** in Artist.
:::
There are a few things to notice:
These can be a fantastic tool to help guide your readers through whatever analytical, reproducible story you’re trying to tell in your Quarto documents.

Subsection 10.7.6 Changing Settings for Specific R Chunks

To the right of each R chunk there is a circular gear icon. Here is where you can change some of the settings of each R chunk. There are three things you’ll see:
  1. Chunk Name: This is where you can also name your chunk.
  2. Output: This is where you can control the output of the specific R chunk. It is by default set to the document default, but this can be altered for individual R chunks.
  3. Slider options: You can further customize the output of an individual R chunk with these four options. You’ll mostly be interested in the first two, as they’re typically the most powerful. For instance, when you first load tidyverse a big message appears, which you can stop by switching "Show messages" to the left.

The gear icon and the #|.

You will notice that each of these manipulations add a line to the beginning of the R chunk, each starting the #|.
Each R chunk is unique and requires different settings based on what is inside and what you want the viewer to see from it.