The video below discusses the factor data type in R. Factors are the data type used to store categorical variables. In R, factors are recognized by statistical procedures such are linear least-squares regression (the lm() function) and handled appropriately.

The data file used in this video can be downloaded here. The R code file can be downloaded here.

The video is about 31 minutes.