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

Re-implement fix in form #86 #112

Merged
merged 4 commits into from Jul 18, 2023
Merged

Re-implement fix in form #86 #112

merged 4 commits into from Jul 18, 2023

Conversation

jwallib
Copy link
Contributor

@jwallib jwallib commented Jul 14, 2023

I had to do a fresh install of the package and found the same bug I had previously so have re-implemented the fix that was dropped in commit f118011

Re implementing my bug fix that was in commit a985ce0 but overwritten in commit 985d336
Dont pipe into as.data.frame to make 'lint' check happy
Copy link
Member

@hanneoberman hanneoberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hanneoberman
Copy link
Member

Reproducing bug with current dev version of ggmice:

ggmice::plot_pattern(cbind(mice::nhanes, "empty var" = NA))
#> Error in `tidyselect::all_of()`:
#> ! Can't subset columns that don't exist.
#> ✖ Column `empty var` doesn't exist.
#> Backtrace:
#>      ▆
#>   1. ├─ggmice::plot_pattern(cbind(mice::nhanes, `empty var` = NA))
#>   2. │ └─... %>% ... at ggmice package/R/plot_pattern.R:109:4
#>   3. ├─dplyr::mutate(...)
#>   4. ├─tidyr::pivot_longer(...)
#>   5. ├─tidyr:::pivot_longer.data.frame(...)
#>   6. │ └─tidyr::build_longer_spec(...)
#>   7. │   └─tidyselect::eval_select(...)
#>   8. │     └─tidyselect:::eval_select_impl(...)
#>   9. │       ├─tidyselect:::with_subscript_errors(...)
#>  10. │       │ └─rlang::try_fetch(...)
#>  11. │       │   └─base::withCallingHandlers(...)
#>  12. │       └─tidyselect:::vars_select_eval(...)
#>  13. │         └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
#>  14. │           └─tidyselect:::eval_context(expr, context_mask, call = error_call)
#>  15. │             ├─tidyselect:::with_chained_errors(...)
#>  16. │             │ └─rlang::try_fetch(...)
#>  17. │             │   ├─base::tryCatch(...)
#>  18. │             │   │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
#>  19. │             │   │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
#>  20. │             │   │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
#>  21. │             │   └─base::withCallingHandlers(...)
#>  22. │             └─rlang::eval_tidy(as_quosure(expr, env), context_mask)
#>  23. ├─tidyselect::all_of(vrb)
#>  24. │ └─tidyselect:::as_indices_impl(x, vars = vars, strict = TRUE)
#>  25. │   └─tidyselect:::chr_as_locations(x, vars, call = call, arg = arg)
#>  26. │     └─vctrs::vec_as_location(...)
#>  27. └─vctrs (local) `<fn>`()
#>  28.   └─vctrs:::stop_subscript_oob(...)
#>  29.     └─vctrs:::stop_subscript(...)
#>  30.       └─rlang::abort(...)

Created on 2023-07-17 with reprex v2.0.2

Fixed after pull request:

ggmice::plot_pattern(cbind(mice::nhanes, "empty var" = NA))

Created on 2023-07-17 with reprex v2.0.2

@hanneoberman hanneoberman merged commit b527808 into amices:main Jul 18, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants