I am using this dataset UCI Machine Learning Repository: Eco-hotel Data Set
I am trying to figure out how to count the frequency of certain words like "room" or "vacation" within each row. I figured out the code to make it work for columns, but I need it for rows.
There are 16 columns in this dataset, but I need the frequency of certain words for each row. If anyone could lend some insights, it would be greatly appreciated.
Here is my code:
summarize(across(everything(), ~ sum(str_detect(., 'room'))))