Question: # Instructions for Rstudio # Loading the Data Set Please install and load the `gapminder` package. Please note that the name of the dataset is

# Instructions for Rstudio

# Loading the Data Set Please install and load the `gapminder` package. Please note that the name of the dataset is also `gapminder`. Also note that you also need to load the `tidyverse` package if you want to use the six (06) verbs from `dplyr` package.

# Question # 1 Please write some information about meta data about `gapminder` data. Don't forget to mention the number of rows (observations) and columns (variables) of the data set. Also mention the type of the variables - `country` and `year`.

# Question # 2 Please subset the `gapminder`dataset for the country `United States` and give the name of the data set `US`. Note that do not forget to discuss the meta data of `US` data set.

# Question # 3 Filter the `gapminder`dataset for all countries except `Europe` and name the data set `not_europe`. Note that do not forget to discuss the meta data of `not_europe` data set.

# Question # 4 Filter the `gapminder`dataset for the `year` 1992 and `gdpPercap` >= 5000 and name the data set `sample` and discuss the meta data of this new dataset.

# Question # 5 Arrange the `gapminder`dataset in both ascending and descending order based on `pop` variable. Identify the countries which have the highest and lowest population.

# Question # 6 Filter the `gapminder`dataset for European countries and in the year 1997 and identify the first two countries which have the highest life expectancy.

# Question # 7 Calculate 2 new variables called `gdp`, which is the product of two variables - `gdpPercap` and `pop` and `LifeEarn`, which is the product of two variables - `gdpPercap` and `lifeExp`and the name the data set `new_data`. Also arrange the `new_data` in descending order based on `gdp` - the new variable that you just created.

# Question # 8 Calculate the average `gdpPercap` for all continents, countries and years. Note that you can write 3 separate codes for the three requirements.

# Question # 9 Draw a line plot for `gdpPercap` and `year`, where `year` is in x axis and `gdpPercap` is in y axis. Also comment about what you can identify from this visualization.

# Question # 10 Visualize the `gdpPercap` of different `continent` in different `year` and do the same thing for `lifeExp` different `continent` in different `year`. Using this two graphs, comment how the income and life expectancy changes/transforms in different continents in different years.

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 Accounting Questions!