I then made a "list" that contains every possible selection of these food and drink items:
lst1 <- lapply(data_frame, function(x) c("none", unlist(lapply(seq_len(length(x)), function(i) combn(x, i, FUN = paste, collapse = " & ")))))
My Question: I would like to take this above list and make a "tree" that shows every possible combination of food and drink choices that can be ordered together - this should look something like this:
Is it possible to do this in R using libraries such as "data.tree" and "ggplot2"?
I see a big difference between your verbal ask and your example chart. so there is too big a gap for me in my understanding of what you want to integrate those and imagine a full solution for you. I will reserve myself to simply providing a way to graph your chart example as that is a concrete goal that seems acheivable...
Here is an attempt to do that