By the end of this tutorial, you should be able to:
Load and explore the built-in dataset in R.
Summarize and visualize data using ggplot2.
Work as a group to describe the relationships in data.
Produce an HTML report in R Markdown.
In your groups, answer the following questions based on your assigned data set (see sections below).
Work together to create a R Markdown HTML output that includes figures created using ggplot2, which you will later present to the class.
Note. You can install ggplot2 either by installing the tidyverse package collection (recommended) or the ggplot2 package alone. Package installation only needs to be done once. Remember to load the packages after installing them.
library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
Load the ‘mtcars’ data set using this code:
{data(mtcars)}
Load the ‘toothGrowth’ data set using this code:
{data(ToothGrowth)}
Load the ‘PlantGrowth’ data set using this code:
{data(PlantGrowth)}
Load the ‘USArrests’ data set using this code:
{data(USArrests)}
Load the ‘iris’ data set using this code:
{data(iris)}
Each group has summarized, visualized, and described relationships in real data.
Present your findings in a knitted HTML report.