-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpractice-lab.qmd
106 lines (73 loc) · 2.49 KB
/
practice-lab.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
title: "Practice Lab"
author: "YOUR NAME HERE"
format: html
embed-resources: true
editor: visual
execute:
echo: true
---
```{r}
#| label: packages-setup
library(tidyverse)
library(ggridges)
```
## Quarto
First, let's make sure you know how to use Markdown formatting to style a Quarto document.
1. Make this text bold.
2. Make this text italicized.
3. Make these into a bullet point list:
Apples
Bananas
Potatoes
4. Edit the YAML to remove warning messages from being output in the rendered HTML file
5. Using code chunk options, make it so this chunk shows the plot but not the source code:
```{r}
ggplot(data = mpg,
mapping = aes(y = manufacturer, x = hwy)) +
geom_boxplot() +
labs(x = "",
y = "",
title = "Highway Milage (mpg) for Different Car Manufacturers"
)
```
6. Using code chunk options, remove the messages about bandwidth `geom_density_ridges()` chose to use:
```{r}
ggplot(data = mpg,
mapping = aes(y = manufacturer, x = hwy)) +
geom_density_ridges() +
labs(x = "",
y = "",
title = "Highway Milage (mpg) for Different Car Manufacturers"
)
```
7. Using code chunk options, make it so that these plots are printed side-by-side:
```{r}
ggplot(data = mpg,
mapping = aes(y = manufacturer, x = hwy)) +
geom_boxplot() +
labs(x = "",
y = "",
title = "Highway Milage (mpg) for Different Car Manufacturers"
)
ggplot(data = mpg,
mapping = aes(y = manufacturer, x = hwy)) +
geom_density_ridges() +
labs(x = "",
y = "",
title = "Highway Milage (mpg) for Different Car Manufacturers"
)
```
8. Using code chunk options, make it so this chunk shows the code but not the output:
```{r}
2 + 2
```
9. Using code chunk options, make it so the file can still knit even though this chunk has an error
```{r}
2 + a
```
10. Using code chunk options, create a descriptive `label` for each of the code chunks above.
## Getting to know your classmates
11. Find someone in the class who has a different major than you. Tell us their name and why they chose that major.
12. Find someone who took Stat 331 from a different professor than you. Compare your experiences. Tell us their name and professor. List one or two things that you think you learned more about, and one or two things that they learned more about.
13. Find someone in the class who does not share your birth month. Tell us their name and birthday, and use R to find out how many days apart your birthdays are.