If you work with categorical data, you can often represent the categories by strings. Strings have some drawbacks, however. For example, a spelling mistake can easily go undiscovered. If you want your categories ordered, then the lexicographical order on strings will not always be the order you need. As an alternative to strings for categories is factors. In this chapter, we look at the functionality that the forcats package provides for creating and manipulating factors.