Skip to content

Footnote marks are not added to the summary stub with cells_stub_grand_summary() #1832

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

Closed
olivroy opened this issue Aug 15, 2024 · 1 comment · Fixed by #1833
Closed

Footnote marks are not added to the summary stub with cells_stub_grand_summary() #1832

olivroy opened this issue Aug 15, 2024 · 1 comment · Fixed by #1833
Assignees
Milestone

Comments

@olivroy
Copy link
Collaborator

olivroy commented Aug 15, 2024

exibble %>% gt() %>% grand_summary_rows(fns = "sum", columns = tidyselect::where(is.numeric)) %>% tab_footnote("xx", locations = cells_stub_grand_summary())

I would expect the 1 to appear next to sum.

image

@olivroy
Copy link
Collaborator Author

olivroy commented Aug 15, 2024

Turns out this was a one-liner fix.

Basically, support was added in #737 for cells_stub_summary().

But now, many of the internal references in gt are to "::rowname::"

Simply updating this in

footnotes_tbl$colname[is.na(footnotes_tbl$colname)] <- "rowname"

solves the issue.

With #1833,

exibble %>% gt() %>% grand_summary_rows(fns = "sum", columns = tidyselect::where(is.numeric)) %>% tab_footnote("xx", locations = cells_stub_grand_summary())

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants