Factors
⏱ Estimated Time to Complete
About 60–75 minutes, including practice exercises and the knowledge quiz.
In this module, we’ll cover R’s tool for representing categorical data: factors. It builds directly on the vector, matrix, list, and data frame concepts you’ve already learned in previous modules.
Content is split into three short tutorials:
Learning Goals
After completing this module, you will be able to:
- Describe the characteristics of an R factor.
- Explain how factors differ from atomic vectors.
- Generate new factors in R.
- Access and modify factor levels.
- Describe important use-cases for factors, and explain why factors are the best choice in these situations.
Click the button below to get started.