Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Exploring Data Frames: Factor #520
This submission is related to the “Exploring Data Frames” episode. An objective of the episode is to understand what a factor is.
Although the order of the factor has no specific meaning in the given example, the order of factor is often meaningful. For example, the levels “low,” “medium,” and “high” in describing the purchasing power of a household. It could also be helpful to point out that R sorts the levels of a factor alphabetically by default (e.g. “high”, “low,” “medium”), which may not align with the ordering of the factor’s underlying value or meaning.