parttree
parttree copied to clipboard
Error in parttree when y is a complex expression
Sorry for not providing a proper MWE or making a merge request, just wanted to highlight a minor bug.
If the formula for the tree is of the form factor(var > 0) ~ ..., parttree returns Error in if (y_factored) { : missing value where TRUE/FALSE needed.
The issue seems to be line 70 of parttree.R. Using deparse instead of paste solves this issue, but more testing would be needed to make sure it doesn't create problems elsewhere. Alternatively, you could use deparse conditionally if length(y_var)>1.
Thanks! I've been neglecting this package, but will look into it when I get a chance. (Hoping to clean up the issues here once I finalize an upstream dependencies that I'm working on.)