parttree icon indicating copy to clipboard operation
parttree copied to clipboard

Error in parttree when y is a complex expression

Open Alex-Cremers opened this issue 2 years ago • 1 comments
trafficstars

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.

Alex-Cremers avatar Oct 12 '23 07:10 Alex-Cremers

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.)

grantmcdermott avatar Feb 10 '24 00:02 grantmcdermott