Grouping factors ending in state name

Viewed 6

I am using r studio. I have a variable column with names of different counties in different U.S. states - over 3000 data points. I'd like to group these counties just by state and have the factors of the variable shrink to the number of states. I suspect I need to use dplyr's group_by function, but not sure of the syntax.

0 Answers
Related