Let's say I have a couple roots, prefixes, and suffixes.
roots <- c("car insurance", "auto insurance")
prefix <- c("cheap", "budget")
suffix <- c("quote", "quotes")
Is there a simple function or package in R which will allow me to construct all possible combinations of the three character vectors.
So I want a list, data frame, or vector which returns the following list of all possible combinations of each string.
cheap car insurance
budget car insurance
cheap car insurance quotes
cheap auto insurance quotes
auto insurance quote
auto insurance quotes
...
With something like 'auto insurance quotes', I'm using just the suffix and no prefix, so I need to get all possible results of those outcomes also.