I am using the vtree package (which is an awesome tool), and I am struggling to figure out how to add titles to it. Here is a sample tree:
I would like to add a title at the top, but since this isn't a gg object I'm a little lost (I think it's an html object? There isn't too much info out there about the vtree package.). How might I add a title that says "My Tree" at the top? Further, how can I save the image? I have tried using png(), but it will not save. Thanks!
MRE:
structure(list(Var1 = c("A", "B", "C", "D", "A", "A", "B", "C"
), Var2 = c(1L, 2L, 3L, 3L, 1L, 2L, 1L, 2L)), class = "data.frame", row.names = c(NA,
-8L))
vtree(ex, c("Var1", "Var2"))
Here you go: