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
8. Counting observations, part two: forcats style
Modifying factor variables


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:



Use fct_count() to calculate the number of people in each marital status group. Use the mrt_status column of the survey dataset.

Stuck? Here's a hint!