Question: 1 . Using the gapminder data in the lesson, do the following: i ) use ` filter ` to select all countries with the following
Using the gapminder data in the lesson, do the following:
i use filter to select all countries with the following arguments:
a life expectancy larger than years.
b United Kingdom and Vietnam and years greater than
ii use arrange and slice to select the countries with the top GDP per capital gdpPercap Use the pipe operator to string multiple functions.
iii use mutate to create a new variable called gdpPercaplifeExp which is the quotient of gdpPercap and lifeExp and display the output.
iv use summarise to find the average or mean value of the variable gdpPercaplifeExp created in part iii
v use groupby to group the countries by continent; and summarise to compute the average life expectancy lifeExp within each continent. Use the pipe operator to string multiple functions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
