Factors
Summary

Instruction

Interesting! As you saw in the exercise, the phone column contains a finite list of possible values. In our case, those are "N" and "Y". We call phone a categorical variable. This is because each entry in the variable belongs to only one of several possible categories (in our case, either "N" or "Y").

Now, in theory, we would like any new house that enters the market to have its corresponding phone entry populated with either an "N" or a "Y". But from a technical perspective, this restriction doesn't exist—you can store any value you want in phone because it's a character vector.

Exercise

We've added two new properties to the houses data frame. Check what values are stored in the phone column. Use the table() function.