In my data frame (df), there is a column in my data set called "Subcategory". It returns all the values which are indented
Advertising and Marketing
- TV Ads
- Website Ads
- Radio Ads
Employee Benefits
- Retirement
- Team Building
- Medical Insurance
Insurance
- Legal Insurance
- Business Insurance
- Rental Insurance
All together there are 46 subcategories that are supposed to be assigned to 12 main categories. What's the quickest way in R to assign and match these subcategories to a new column called Category with the appropriate matching?