Answer the following questions and/or complete the exercises in
RMarkdown. Please embed all of your code and push the final work to your
repository. Your report should be organized, clean, and run free from
errors. Remember, you must remove the # for any included
code chunks to run.
library("tidyverse")
In order to answer the questions below, you will need to do a little online research.
1. Make three new vectors that show the name, height in feet, and height in meters of the five tallest mountains in the world.
2. Combine these vectors into a data frame called
mountains.
3. What is the mean height of the mountains in feet?
4. When were each of these mountains first climbed (i.e. in
what year)? Make a new vector first_climbed and add it to
the mountains data frame.
5. How many times have each of these mountains been climbed?
Make a new vector summits and add it to the
mountains data frame.
6. Which mountain has the highest number of fatalities? Make
a new vector fatalities and add it to the
mountains data frame.
7. What is the fatality rate (i.e., fatalities divided by
summits) for each mountain? Create a new vector
fatality_rate and add it to the mountains data
frame.
8. Write your data frame to a .csv file called
mountains_data.
9. Clear your environment panel by clicking on the broom
icon. Then read in your mountains_data.csv file to a new
object called mountains.
10. Use a summary function of your choice to show the
structure of your mountains data frame.
Please knit your work as an .html file and upload to Canvas. Homework is due before the start of the next lab. No late work is accepted. Make sure to use the formatting conventions of RMarkdown to make your report neat and clean!