robertspierre
robertspierre

Reputation: 4431

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"?

Upvotes: 2

Views: 57

Answers (1)

RHA
RHA

Reputation: 3872

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.

Upvotes: 1

Related Questions