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

प्रॉम्प्ट इंजिनिअरिंग: सविस्तर मार्गदर्शक (उदाहरणांसह)

मी हा लेख कृत्रिम बुद्धिमत्ता (Artificial Intelligence) आणि तिचा वापर कसा करावा याबद्दल लिहिला आहे, जेणेकरून इंग्रजीत सहज बोलू न शकणाऱ्या आप...