library(vtree)
It doesn’t take many variables before a variable tree gets too large to display in its entirety.
vtree(FakeData,"Severity Category Group Sex",horiz=FALSE,height=200,width=900)
One solution is to prune the tree, that is to remove parts of it. Let’s see how that works with the tree above. First, suppose that we’re not interested in the cases where Severity is Moderate:
vtree(FakeData,"Severity Category Group Sex",horiz=FALSE,height=200,width=900,
prune=list(Severity="Moderate"))
The tree is still quite large. So let’s say we’re not interested in the cases where Severity is Mild either:
vtree(FakeData,"Severity Category Group Sex",horiz=FALSE,height=250,width=600,
prune=list(Severity=c("Mild","Moderate")))
Finally, let’s only keep Group A:
vtree(FakeData,"Severity Category Group Sex",horiz=FALSE,height=250,width=600,
prune=list(Severity=c("Mild","Moderate")),keep=list(Group="A"))