We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
filter()
Since #5974 we forbid matrices. This causes some issues, e.g. with package ggcharts:
ggcharts
── After ───────────────────────────────────────────────────────────────────────────────────────────────────── > checking examples ... ERROR Running examples in ‘ggcharts-Ex.R’ failed The error most likely occurred in: > ### Name: diverging_bar_chart > ### Title: Diverging Bar Chart > ### Aliases: diverging_bar_chart > > ### ** Examples > > if (requireNamespace("tidyr")) { + library(magrittr) + data(biomedicalrevenue) + biomedicalrevenue %>% + dplyr::filter(year > 2016) %>% + tidyr::pivot_wider( + values_from = revenue, + names_from = year, + names_prefix = "revenue_" + ) %>% + dplyr::mutate(diff = revenue_2018 - revenue_2017) %>% + diverging_bar_chart(company, diff) + } Loading required namespace: tidyr > > data(mtcars) > mtcars_z <- dplyr::transmute( + .data = mtcars, + model = row.names(mtcars), + hpz = scale(hp) + ) > > diverging_bar_chart(mtcars_z, model, hpz) Error: Problem while computing `..1 = hpz >= 0`. ✖ Input `..1` must be a logical vector, not a logical[,1]. Backtrace: ▆ 1. ├─ggcharts::diverging_bar_chart(mtcars_z, model, hpz) 2. │ └─ggcharts:::diverging_chart(...) 3. │ ├─ggplot2::geom_text(...) 4. │ │ └─ggplot2::layer(...) 5. │ │ └─ggplot2::fortify(data) 6. │ ├─dplyr::filter(data, !!y >= 0) 7. │ └─dplyr:::filter.data.frame(data, !!y >= 0) 8. │ └─dplyr:::filter_rows(.data, ..., caller_env = caller_env()) 9. │ └─dplyr:::filter_eval(dots, mask = mask, error_call = error_call) 10. │ ├─base::withCallingHandlers(...) 11. │ └─mask$eval_all_filter(dots, env_filter) 12. ├─dplyr:::dplyr_internal_error(...) 13. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data) 14. │ └─rlang:::signal_abort(cnd, .file) 15. │ └─base::signalCondition(cnd) 16. └─dplyr `<fn>`(`<dpl:::__>`) Execution halted 1 error x | 0 warnings ✓ | 0 notes ✓
The text was updated successfully, but these errors were encountered:
Should we allow matrices that have one column (maybe with a warning) ?
Sorry, something went wrong.
allow matrics with 1 column in filter(), with a warning.
aa9ee6a
closes #6082
allow matrics with 1 column in filter(), with a warning. (#6083)
ca56110
* allow matrics with 1 column in filter(), with a warning. closes #6082 * not just yet warn in filter() for matrices with 1 column
Successfully merging a pull request may close this issue.
Since #5974 we forbid matrices. This causes some issues, e.g. with package
ggcharts
:The text was updated successfully, but these errors were encountered: