Psst! Check what courses we have in our offer, and get them all here to save $727. Act fast–this deal is available only 3/14–3/21.


Good job! By default, R creates levels in alphabetical order. For example, the order of levels in our phone variable is "N", "Y" because N alphabetically precedes Y. This default order is not a good solution when your categories have a natural order to them.


Convert the price_category column from the houses data frame to a factor.

Create a bar chart using the price_category variable.

Stuck? Here's a hint!

Use barplot() in combination with the table() function. First, make a frequency table with the table() function, and then use it to construct the barplot.