Exercise: Plot life expectancy of Brazil
Create your first line graph showing the life expectancy of people from Brazil over time.
- Use the
ggplot()
function and specify thegapminder_brazil
dataset as input - Add a
geom_line()
layer to the plot - Map the
year
to the x-axis and the life expectancylifeExp
to the y-axis with theaes()
function
Results
Submit code to see output here.