问题
I came across something really odd.. and I couldn't figured it out why..
I use the same code here below :
library(party)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")
r_tree
two week ago I got normal graph .. but today my terminal nodes have some odd numbers in them like showing in this picture below.. I have tried to restarted my PC , uninstalled the packet , reinstall again and again , but it still not working..

Thanks
回答1:
This is a bug caused by package "partykit". If you'll reopen R from start or do:
detach("package:partykit", unload=TRUE)
and run
library(party)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")
You'll get the normal plot

But if you'll library the "partykit" package again and rerun the same code, you''ll get that nonsense plot again
library(partykit)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")

来源:https://stackoverflow.com/questions/14781349/ctree-plot-decision-tree-in-party-package-in-r-terminal-node-occurs-some-weird