You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
Description
Hello! 🍁
Would it be possible to update cols_hide() to no longer error when no columns are selected?
Thanks!
Reproducible example
packageVersion("gt")
#> [1] '0.9.0'gt::sp500|>gt::gt() |>gt::cols_hide(columns= starts_with("xxxxx"))
#> Error in `gt::cols_hide()`:#> ! Columns must be provided.#> Backtrace:#> ▆#> 1. └─gt::cols_hide(gt::gt(gt::sp500), columns = starts_with("xxxxx"))#> 2. └─cli::cli_abort("Columns must be provided.")#> 3. └─rlang::abort(...)# in my real-world example, I wanted to hide columns that were all naall_na<-function(x) all(is.na(x))
gt::sp500|>gt::gt() |>gt::cols_hide(columns= where(all_na))
#> Error in `gt::cols_hide()`:#> ! Columns must be provided.#> Backtrace:#> ▆#> 1. └─gt::cols_hide(gt::gt(gt::sp500), columns = where(all_na))#> 2. └─cli::cli_abort("Columns must be provided.")#> 3. └─rlang::abort(...)
Prework
Description
Hello! 🍁
Would it be possible to update
cols_hide()
to no longer error when no columns are selected?Thanks!
Reproducible example
Created on 2023-06-06 with reprex v2.0.2
Session info
Expected result
When no columns are selected, I expected simply no columns to be hidden rather than an error
The text was updated successfully, but these errors were encountered: