End of Summer - hours only!Up to 80% off on all courses and bundles.-Close
Factors and how to create them
Working with factors
8. Counting observations, part two: forcats style
Modifying factor variables
Summary

Instruction

You know that R sometimes has many ways to get the same result. This is another one of those times. If we use the forcats way, fct_count() will count the occurrence of each level. Instead of the long command we wrote in the previous exercise, all we have to do is type: