The levels Function in R


Levels in R are a way of defining the possible values of a factor variable. A factor variable is a categorical variable that can have one of a fixed set of values. For example: a data field such as marital status may contain only values from single, married, separated, divorced, or widowed. These predefined, distinct values are called levels.

For a use case example, consider the post called Factors in R.

Leave a Reply