Interpreting Rows as Headers

The first row of this csv file is a list of column names.
We used the header=TRUE argument to read.csv so that R can interpret the file correctly.
We are using the stringsAsFactors=FALSE argument to override the default behaviour for R.
Using factors in R is covered in a separate lesson.

Lets take a look at this data.

class(dat)

[1] "data.frame"

R has loaded the contents of the .csv file into a variable called dat which is a data frame.