library(gapminder)
# what does this next line do?
gap = gapminder[11:14,]
# take a look at gap
gap
# a column is a vector
gap$continent
# look at the structure
# - what variable type is continent?
# - what do the 1's and 2's mean?
str(gap$continent)
# look at the structure
# - what variable type is year?
# - what does [1:4] mean?
# - what are the numbers it prints after the [1:4]?
str(gap$year)
# look at the structure of gap
# gap is a data frame (specifically a type called a tibble)
# data frames are named lists of column vectors, which is
# why we can access a column using datasetname$columnname
str(gap)