Monday, December 14

How to use Gapminder DatatSet - R Language

Here are some quick points I picked while experimenting with gapminder dataset
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)


---

No comments:

Post a Comment

Understanding Generative AI and Generative AI Platform leaders

We are hearing a lot about power of Generative AI. Generative AI is a vertical of AI that  holds the power to #Create content, artwork, code...