For this exercise, you will need to use the package `mosaic` tofind numerical and graphical summaries.
```{r warning=FALSE, message=FALSE}
# install packages if necessary
if (!require(mosaic)) install.packages(`mosaic`)
if (!require(dplyr)) install.packages(`dplyr`)
if (!require(gapminder)) install.packages(`gapminder`)
# load the package in R
library(mosaic) # load the package mosaic to use itsfunctions
library(dplyr) # load the package dplyr to use its functions
library(gapminder) # load the package gapminder for question1
```
1. Using the gapminder data in the lesson, do the following:
i) use `filter` to select all countries with the followingarguments:
a) life expectancy larger than 60 years. Â Â
b) United Kingdom and Vietnam and years greater than 1990.
ii) use `arrange` and `slice` to select the countries with the top15 GDP per capital `gdpPercap`. Use the pipe `%>%` operator tostring multiple functions.
iii) use `mutate` to create a new variable called`gdpPercap_lifeExp` which is the quotient of `gdpPercap` and`lifeExp` and display the output.
iv) use `summarise` to find the average or mean value of thevariable `gdpPercap_lifeExp` created in part (iii). Â
v) use `group_by` to group the countries by `continent`; and`summarise` to compute the average life expectancy `lifeExp` withineach continent. Use the pipe `%>%` operator to string multiplefunctions.
 Â
 Â
### Code chunk
```{r}
# load the necessary packages
library(mosaic)
library(dplyr)
library(gapminder)
# last R code line
```