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

MUSTREAD : How can you use Index Funds to help create wealth? HDFC MF Weekend Bytes

https://www.hdfcfund.com/knowledge-stack/mf-vault/weekend-bytes/how-can-you-use-index-funds-help-create-wealth?utm_source=Netcore&...