I have a data set with 6 categorical variables with levels ranging from 5 to 28. I have obtained an output from ctree() (party package) with 17 terminal nodes. I have followed the inputs by @Galled from ctree() - How to get the list of splitting conditions for each terminal node? to arrive at my desired output.
But, I'm getting the following error post running the code:
Error in data.frame(ResulTable, Means, Counts) :
arguments imply differing number of rows: 17, 2
I have tried adding this extra lines:
ResulTable <- rbind(ResulTable, cbind(Node = Node, Path = Path2))
ResulTable$Node <- rownames(ResulTable)
melt(ResulTable)
but no success so far. Any pointers on where it is going wrong?