R Markdown

###A recent poll of 3,057 individuals asked: “What’s the longest vacation you plan to take this summer?” The following relative frequency distribution summarizes the results.

###a. Construct the frequency distribution of these data. (Round your answers to the nearest whole number.)

respon = c("A few days", "A few long weekends", "One week", "Two weeks")
relfreq = c(0.21, 0.18, 0.36, 0.25)
freq = round(relfreq * 3057, 0)
myData = data.frame(Response = respon, Frequency = freq, RelFreq = relfreq)
myData
##              Response Frequency RelFreq
## 1          A few days       642    0.21
## 2 A few long weekends       550    0.18
## 3            One week      1101    0.36
## 4           Two weeks       764    0.25

b. Construct a bar chart for this data. (Before plotting the points, round the “Frequency” to the nearest whole number. Click on the x-axis exactly below the “0” point and then drag the bar till it reaches the correct answer.)

## Warning: package 'tidyverse' was built under R version 4.0.5
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.3     v purrr   0.3.4
## v tibble  3.1.2     v dplyr   1.0.6
## v tidyr   1.1.3     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## Warning: package 'ggplot2' was built under R version 4.0.5
## Warning: package 'tibble' was built under R version 4.0.5
## Warning: package 'tidyr' was built under R version 4.0.5
## Warning: package 'readr' was built under R version 4.0.5
## Warning: package 'purrr' was built under R version 4.0.5
## Warning: package 'dplyr' was built under R version 4.0.5
## Warning: package 'stringr' was built under R version 4.0.5
## Warning: package 'forcats' was built under R version 4.0.5
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()

###Comment Most persons surveyed take one week off a year.