Please help with converting a character vector of shopping items into "transactions" for arules. The original data is something like:
shopping_items <- c("apple banana", "orange", "tea orange beef")
Each element of the vector represents items bought in a single transaction, and the items are separated by a space " ", for example transaction 1 includes two items which are apple and banana. How can I convert this into "transactions" type so that I can work with it in arules?
Thank you in advance !
This is the short version: