-
Notifications
You must be signed in to change notification settings - Fork 218
Add ability to have unlimited column spanners #905
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
Conversation
* master: Honor default `locale` setting when rendering summary rows (#907)
R/tab_create_modify.R
Outdated
| spanners_existing <- | ||
| spanners_existing %>% | ||
| dplyr::select(spanner_id, vars, spanner_level) | ||
| for (i in seq_len(nrow(spanners_tbl))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, take it or leave it:
highest_level <- spanners_tbl %>%
dplyr::filter(vapply(vars, function(x) any(spanned_vars %in% x), logical(1))) %>%
dplyr::pull("spanner_level") %>%
max()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to get this to work with the current tests in place. Could you make this a code suggestion? Perhaps I didn't integrate this correctly.
Co-authored-by: Joe Cheng <joe@rstudio.com>
This PR revises the
tab_spanner()andtab_spanner_delim()functions so that there is no hard limit for only one level of spanner labels.Fixes: #746