I am interested in making a picture like this:
Basically, I would like to show all the combinations possible. I tried to do this with ggplot2, but I can't find an exact function that makes this tree.
Is there a straightforward way to do this?
I created some data like this:
var1 <- sample( LETTERS[1:5], 100, replace=TRUE, prob=c(0.2, 0.2, 0.2, 0.2, 0.2) )
var2 <- sample( LETTERS[6:7], 100, replace=TRUE, prob=c(0.5, 0.5) )
var3<- sample( LETTERS[8:11], 100, replace=TRUE, prob=c(0.1, 0.2, 0.65, 0.05) )
f <- data.frame(var1, var2, var3)
f$var1 = as.factor(f$var1)
f$var2 = as.factor(f$var2)
f$var3 = as.factor(f$var3)
I tried:
plot(f)
But this didn't work. Thanks!

