We will use the data from Table 8 in Section 2.2 (Wendyโs Arrivals). First, load the data into R. The head(Table8,n=5) command will display the variable name along with the first 5 observations in the data set.
Table8 <- read.csv("https://sullystats.github.io/Statistics6e/Data/Chapter2/Table8.csv")
head(Table8,n=5)
## Arrivals
## 1 7
## 2 5
## 3 2
## 4 6
## 5 2
Notice the name of the variable is Arrivals.
We will use the Mosaic package. If you have not installed the package, use the following:
install.packages("mosaic")
The syntax for the dot plot is
gf_dotplot(~Variable_name,data=mydata)
library(mosaic)
gf_dotplot(~Arrivals,data=Table8,title="Arrivals at Wendy's")