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

In Release v0.1.1, cat_collapse() example in README fails with UnDefVarERROR. #9

Closed
proudindiv opened this issue Feb 1, 2024 · 4 comments

Comments

@proudindiv
Copy link

In README "Examples" at "cat_collapse()", I get error "UndefVarError: .$(Expr(:escape, :Dict)) not defined:". (The same thing happens if I run it in the repl.)
Stacktrace

However, the second argument function runs ok.
argument

I'm running julia Version 1.10.0 (2023-12-25) in juypter 4.9.1-1.
Status
linuxmint

@drizk1
Copy link
Member

drizk1 commented Feb 1, 2024

Thank you for catching this, @proudindiv

Given the error, I think this may be an issue with how @mutate is working, so I am going to loop @kdpsingh in to get his take. Depending on his perspective, I can try to find an alternative way for cat_collapse to work.

As a temporary workaround, the following will still work.

test = cat_collapse(df.CatVar, Dict("Low" => "bad", "Zilch" => "bad"))
df2 = @chain df begin
  @mutate(CatVar = !!test)
end

@kdpsingh
Copy link
Member

kdpsingh commented Feb 1, 2024

Thanks for tagging me. I know exactly why this is happening and will fix it soon. It is an issue in TidierData.jl and not TidierCats.jl

@kdpsingh
Copy link
Member

kdpsingh commented Feb 4, 2024

This should now be fixed. Feel free to install the latest version of TidierData and confirm.

@proudindiv
Copy link
Author

Fix works, thank you.

@drizk1 drizk1 closed this as completed Feb 4, 2024
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

3 participants