I have a similar question as in
how to get all terminal nodes - weight & response prediction 'ctree' in r
I would like to get the result like this. Nevertheless, the nodes()-function does not work properly in my case. And I do not understand why.
tree <- ctree(DV ~ IV, data = data)
nodes(tree, unique(where(tree)))
When I run it, I allways get the following error:
Error in match.arg(data, choices = c("all", "organization", "endpoint", :
'arg' must be NULL or a character vector
What can I do in order to make the function work?
Thank you very much in advance!