Instructions

Exercises: 1-5 (3.2.4 Exercises); 1-2, 5 (3.3.1 Exercises); 1-5 (3.6.1 Exercises); Open Response

Submission: Submit an electronic document on Canvas. Must be submitted as an HTML file generated in RStudio. All assigned problems are chosen according to the textbook R for Data Science. You do not need R code to answer every question. If you answer without using R code, delete the code chunk. If the question requires R code, make sure you display R code. If the question requires a figure, make sure you display a figure. A lot of the questions can be answered in written response, but require R code and/or figures for understanding and explaining.

Chapter 3 (3.2.4 Exercises)

Exercise 1

#

Exercise 2

#

Exercise 3

?mpg
#

Excercise 4

#

Excercise 5

#

Chapter 3 (3.3.1 Exercises)

Exercise 1

#

Exercise 2

#

Exercise 5

#

Chapter 3 (3.6.1 Exercises)

Exercise 1

#

Exercise 2

#

Exercise 3

#

Exercise 4

#

Exercise 5

#

Open Response

For this exercise, use the diamonds dataset in the tidyverse. Use ?diamonds to get more information about the dataset.

Step 1: Select 1 numeric variable and 2 categorical variables. Create a graphic using geom_boxplot() and facet_wrap to illustrate the empirical distributions of the sample.

Step 2: Choose 2 numeric variables and 2 categorical variables and creatively illustrate the relationship between all the variables.