Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Factors and how to create them
Working with factors
Modifying factor variables
Summary
21. Exercise 2

Instruction

What are the most popular car brands?

Exercise

Count the number of car brands in our data. Display only the four most popular car brands. Collapse all other brands to one category: Other.

Stuck? Here's a hint!

Type:

fct_count(fct_lump(cars$brand, n = 4))