Question: As we learned in our tutorial, more advanced tools for indexing and slicing data frames are available through the dplyr package. In this exercise, we

As we learned in our tutorial, more advanced tools for indexing and slicing data frames are available through the dplyr package. In this exercise, we will apply the select, filter, and arrange tools to manipulate and organize our Covid-19 data frame. In this exercise, we will focus on the Covid-19 hospitalization data from countries in Europe. Therefore, we first want to subset our data frame to include only the columns with keywords icu and hosp, along with the metadata on continent, location, and date.
Q1. Using the dplyr package, generate a new dataframe called hosp_covid_df using the select function that contains only the metadata (continent, location, and date) and the nine columns that contain keywords icu and hosp from the dataframe primary_covid_df.
Note, there may be many rows or cells with NA, leave them be for now.As we learned in our tutorial, more advanced tools for indexing and slicing data frames are available through the dplyr package. In this exercise, we will apply the select, filter, and arrange tools to manipulate and organize our Covid-19 data frame. In this exercise, we will focus on the Covid-19 hospitalization data from countries in Europe. Therefore, we first want to subset our data frame to include only the columns with keywords icu and hosp, along with the metadata on continent, location, and date.
Q1. Using the dplyr package, generate a new dataframe called hosp_covid_df using the select function that contains only the metadata (continent, location, and date) and the nine columns that contain keywords icu and hosp from the dataframe primary_covid_df.
Note, there may be many rows or cells with NA, leave them be for now.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!