As already pointed out by @DavidArenburg the data df
you used for growing the tree almost surely had a TYPE
variable with three levels although only two of these actually occurred in the observed data. See below for a reproducible example based on the print-out you provided.
As for the problem that the levels are not visible in the plot: The reason is that you used a plotting window that is too small for the default font size. Hence, overplotting labels are not shown. The easiest solution for this is to simply increase the size of the plotting window. Alternatively, you can decrease the font size. See below for an example.
Read the data:
df <- read.table(textConnection(" TYPE USERS VISITS SIZE
1 no 3 5 118266
2 no 3 5 118548
3 yes 1 0 274558
4 no 3 10 86078
5 yes 3 4 355091
7 yes 18 0 29915
8 yes 6 0 278590
9 yes 5 0 477850
10 yes 1 2 67751
11 yes 4 9 309361
"))
And then grow and visualize the tree:
library("partykit")
ct <- ctree(TYPE ~ ., data = df)
plot(ct)

As you see a ctree
with a binary response is displayed where stacked bars are used. To obtain bars plotted side by side you need to modify the arguments for the terminal panel function accordingly:
plot(ct, tp_args = list(beside = TRUE))

And finally to change the size of the labels the grid
graphical parameters can be altered. (Note that this necessitates the partykit
rather than the party
implementation of ctree()
.)
plot(ct, tp_args = list(beside = TRUE), gp = gpar(fontsize = 33))
