Trying to call pfa.rpart on a regression tree (instead of a classification tree as in the example) gives the following
model <- rpart::rpart(Sepal.Length ~ ., data=iris)
model_as_pfa <- pfa(model)
Console:
Error in if (!is.na(node$SplitVar)) { : argument is of length zero
Please advise.