I don't think there is direct way to do this, but I will propose a "hack" using the weights
argument in ctree
.
Let's start with a reproducible example
library(party)
irisct <- ctree(Species ~ .,data = iris)
plot(irisct)
Now, suppose you want to get rid of node number 5. You can do the following
NewWeigths <- rep(1, dim(iris)[1]) # Setting a weights vector which will be passed into the `weights` attribute in `ctree`
Node <- 5 # Selecting node #5
n <- nodes(irisct, Node)[[1]] # Retrieving the weights of that node
NewWeigths[which(as.logical(n$weights))] <- 0 # Setting these weigths to zero, so `ctree` will disregard them
irisct2 <- ctree(Species ~ .,data = iris, weights = NewWeigths) # creating the new tree with new weights
plot(irisct2)
Note how nodes 2, 6 and 7 (now they are named 2, 4 and 5 because we have less splits) remained exactly with the same distribution and splitting conditions.
I didn't test it for all nodes, but it seem to work fairly well