Here are some quick points I picked while experimenting with gapminder dataset
Before you can work with the
Note - Install gapminder & dplyr packages before trying following commands. You can search this blog for instructions on how to install R packages.
##### Code Sample #######
##### Load packages gapminder & dplyr
library(gapminder)
library(dplyr)
# Filter the gapminder dataset for the year 1957
gapminder %>% filter(year == 1957)
# Filter for India in 2002
gapminder %>% filter(country == "India" , year == 2002)
---
Before you can work with the
gapminder
dataset, you'll need to load two R packages that contain the tools for working with it, then display the gapminder
dataset so that you can see what it contains.Note - Install gapminder & dplyr packages before trying following commands. You can search this blog for instructions on how to install R packages.
##### Code Sample #######
##### Load packages gapminder & dplyr
library(gapminder)
library(dplyr)
# Filter the gapminder dataset for the year 1957
gapminder %>% filter(year == 1957)
# Filter for India in 2002
gapminder %>% filter(country == "India" , year == 2002)
---