Reputation: 21
I'm struggling with an error message that I don't understand. I'm doing some decision trees and everything goes fine, until I try to plot it
plot(as.party.Weka_tree(CostSensitive_Tree))
which gives this error:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'plot': could not find function "as.party.Weka_tree"
I checked multiple times with help.search("as.party.Weka_tree")
and the package (
partykit) is installed, what could be the cause of this error?
Thanks!
Upvotes: 1
Views: 240
Reputation: 17203
First, you need to make sure that the package is loaded, i.e., library("partykit")
. Second, you should not call the S3 method directly but just say as.party(CostSensitive_Tree)
. Internally the as.party()
generic function then dispatches to the as.party.Weka_tree()
method but the latter should not be called directly.
Upvotes: 0