Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent as.character(formula)==3L error #41

Closed
rjfhoffman opened this issue Mar 7, 2023 · 4 comments
Closed

Consistent as.character(formula)==3L error #41

rjfhoffman opened this issue Mar 7, 2023 · 4 comments

Comments

@rjfhoffman
Copy link

Hello,

In the last week, missRanger has been giving an error that "length(formula <- as.character(formula)) == 3L is not TRUE". This error is also coming up when I ran the vignette code to see if it was an issue with my data, but this error comes up every time:

irisImputed <- missRanger(irisWithNA, pmm.k = 3, num.trees = 100, verbose = 0)
irisImputed <- missRanger(irisWithNA, formula= .~.-Species, pmm.k = 3, num.trees = 100, verbose = 0)
@mayer79
Copy link
Owner

mayer79 commented Mar 7, 2023

Thanks for reporting!

@mayer79
Copy link
Owner

mayer79 commented Mar 7, 2023

Hello @rjfhoffman : the error is likely to come from loading package "moderndive". It imports formula.tools:::as.character.formula(), which breaks base:::as.character().

In 2019(!) I opened this issue

decisionpatterns/formula.tools#11

without answer from the developers.

Can you check in a fresh session without loading any of the above packages?

@rjfhoffman
Copy link
Author

After starting a fresh session without including these packages (or other packages that require them) missranger runs again

@mayer79
Copy link
Owner

mayer79 commented Mar 7, 2023

Perfect. The issue with above package is still unfortunate.

@mayer79 mayer79 closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants