rcategorical-data

Difference between factor and category in R


In the Hmisc::describe documentation (at page 76) there is written:

This function determines whether the variable is character, factor, category, binary, discrete numeric, and continuous numeric, and prints a concise statistical summary according to each

What is the difference between a "factor" and a "category"?


Solution

  • On page 12 of the same document, it is stated that:

    Categorical predictors are required to be coded as integers (as factor does internally).

    So the difference is mainly their appearance if I get it right.