I am working with the following problem. I have a list with different size and I wanna count the occurrence of the words but join the same combinations like that:
[[1]]
"Room" "Residential
[[2]]
"Residential" "Room"
[[3]]
"Garage"
[[4]]
"Room" "Residential" "Comercial"
Results - combn | value
'Room, Residential': 2
'Garage': 1
"Room, Residential, Comercial': 1
Any ideas?
DATA
list(c("Room", "Residential"), c("Residential", "Room"), "Garage",
c("Room", "Residential", "Comercial"))