I have a dataset that contains an identifier variable (census_tract_number) and a categorical variable (action_taken_name) that contains five categories. I am trying to figure out how to create a new data frame that will break each category into a variable and show the frequency for each of these categories by census_tract_number. I have figured out how to create a frequency variable with count but I want each category to be an individual variable with the counts underneath.
