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

Collapse rows #601

Open
ratnanil opened this issue Jun 4, 2020 · 0 comments
Open

Collapse rows #601

ratnanil opened this issue Jun 4, 2020 · 0 comments
Milestone

Comments

@ratnanil
Copy link

ratnanil commented Jun 4, 2020

A feature that I'm missing in this great package is the ability to "span cells" between rows. This would be a feature similar as gt currently behaves when passing it a grouped dataframe. However, instead of adding the grouped column as an additional row, it would be cool if there was a way to merge cells with the same value, similar to the function kableExtra::collapse_rows (see way below)

Current behaviour

library(gt)
library(dplyr)

iris %>%
  group_by(Species) %>%
  sample_n(3) %>%
  gt()

image

Desired output as demonstrated with kableExtra:

library(kableExtra)

iris %>%
  group_by(Species) %>%
  sample_n(3) %>%
  kable() %>%
  collapse_rows(5)

image

PS: Issue #108 (comment) contains a link to this very feature from kableExtra, but that might be a mistake

@rich-iannone rich-iannone added this to the FUTURE milestone Aug 22, 2022
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

2 participants