Exploring the Gapminder dataset

Explore R markdown:

Here is a link

Al Gore once said:

You are hearing me talk

Set up the data:

library(lattice)
gDat <- read.delim("gapminderDataFiveYear.txt")

Now explore basic stats:

# Types of data
names(gDat)
## [1] "country"   "year"      "pop"       "continent" "lifeExp"   "gdpPercap"

# Number of observations
length(gDat[, 1])
## [1] 1704

# Highest GDP percapita in dataset
max(gDat$gdpPercap)
## [1] 113523

Lastly, plot from the data

# How life expectancy has changed in Canada
xyplot(lifeExp ~ year, gDat, subset = country == "Canada")

plot of chunk unnamed-chunk-3