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:

  1. Factors
  2. Creating Factors
  3. Special Role of Factors
  4. When to Use a Factor

Learning Goals

After completing this module, you will be able to:

  1. Describe the characteristics of an R factor.
  2. Explain how factors differ from atomic vectors.
  3. Generate new factors in R.
  4. Access and modify factor levels.
  5. Describe important use-cases for factors, and explain why factors are the best choice in these situations.

Click the button below to get started.

Back to top