A category is a vector object used to specify a discrete classification of the components of other vectors of the same length. A factor is similar, but has the class factor, which means that it is adapted to the generic function mechanism. Whereas a category can also be used as a plain numeric vector, for example, a factor generally cannot.