Question
1. Please add your great photo using `knitr::include_graphics()`. Please don't show the code, add a figure caption and put the caption on the margin. ```{r}
1. Please add your great photo using `knitr::include_graphics()`. Please don't show the code, add a figure caption and put the caption on the margin.
```{r} #| label: photo
```
2. Use the chunk option `echo` to **NOT** to show `library(tidyverse)`, `library(ggplot2)`, and `library(ggrepel)`. Also, use the option `fig.align` to have the figure right-aligned. *Note: you may need to use !expr.
```{r} #| label: opt-echo
library(tidyverse) library(ggplot2) class_avg <- mpg |> group_by(class) |> summarise(displ = median(displ), hwy = median(hwy)) library(ggrepel) ggplot(mpg, aes(displ, hwy, colour = class)) + geom_label_repel(aes(label = class), data = class_avg, size = 6, label.size = 0, segment.color = NA) + geom_point() + theme(legend.position = "none") ```
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started