--- title: "Stat. 651 Quiz 1" output: word_document: default html_notebook: default pdf_document: default --- **Instructions:** This is an open book, open notes, and open Google/internet test. You may use R on your own computer or the lab computer. You may use a calculator. Type your answers to the questions into an R Notebook. Answer the questions in order. Answer each the question that is asked above your R code chunks. You must write a sentence containing your answer. Your files should have a name in the usual form for the class **lastname_firstname_Stat651_Quiz1.Rmd** and **lastname_firstname_Stat651_Quiz1.docx** or **lastname_firstname_Stat651_Quiz1.pdf**. Submit **both** files in Backboard before the end of class period. **Academic Honesty:** As a student at CSU East Bay you are held to the standards stated in the Academic Dishonesty Policy. Copying another student’s work or allowing another student to copy your work is academically dishonest. I expect you to be academically honest while taking the test. These question is related to the homework from Chapter 3. For the *RailTrail* dataset from the *mosaicData* R package answer the following questions. The data is from [Northampton, MA](http://northamptonma.gov/DocumentCenter/View/5244/Walk_Bike_Northampton_Existing3416?bidId=). ```{r eval=FALSE} library(tidyverse) library(mosaic) ``` 1. Create a scatterplot of the *volume* (number of crossing per day) against the *high temperature* that day. **Answer:** ```{r} ``` 2. Separate your previous plot into facets by *weekday*. **Answer:** ```{r} ``` 3. Examine the plot you have created in the previous question, is there anything about the plot that is unclear? Suggest a way to fix the issue you have described. Make a improved plot. **Answer:** ```{r} ``` 4. Separate your plot into facets by summer and weekday. The summer variable used for the rows and the weekday variable for the columns. **Answer:** ```{r} ``` 5. Examine the plot you have created in the previous question, is there anything about the plot that is unclear? Suggest a way to fix the issue you have described. Make a improved plot. Hint: Change the *summer* variable to a factor and use %+% to replace the data in the original plot p. **Answer:** ```{r} ``` 6. Add regression lines to the four facets. When does the relationship between *volume* and *hightemp* change? **Answer:** ```{r} ``` 7. (Extra Credit) Compute the slope of each regresion line. Hint: Use the map function from the **purrr** R package. **Answer:** ```{r} ``` 8. Plot *volume* versus each of the following variables: *hightemp*, *lowtemp*, *cloudcover*, *precip*. Add regression lines. Put the 4 plots into one ggplot using a function from the **cowplot** R package. **Answer:** ```{r} ``` 9. Export the RailTrail data to a .csv file and load it into the Tableau. ```{r eval=FALSE} write_csv(RailTrail, "RailTrail.csv") ``` 10. Make the same plots in Tableau. Arrange them into a Story. Export the Story as a .pptx file. **Answer:** ```{r} ```