I have a vector wih 3 elements tempo <- c("VAR1", "VAR2", "VAR3")
Is there a functionwhich can give me all combinations of thoses elements without repetition?
I want a result like : tempo2 <- c("VAR1", "VAR2", "VAR3", "VAR1 + VAR2", "VAR1 + VAR3", "VAR2 + VAR3")
I first tried using expand.grid(tempo,tempo)
but it gives me "VAR1 VAR2" but also "VAR2 VAR1".
do you have an idea?
Thanks a lot!!