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

Strange footer behavior in GT tables in loops with RMarkdown #614

Closed
Tracked by #1792
jcanistrum opened this issue Jun 29, 2020 · 2 comments
Closed
Tracked by #1792

Strange footer behavior in GT tables in loops with RMarkdown #614

jcanistrum opened this issue Jun 29, 2020 · 2 comments
Milestone

Comments

@jcanistrum
Copy link

In the example below, the same GT table displays the footnote differently when inside and outside of a loop.
Screen Shot 2020-06-29 at 09 52 35
Screen Shot 2020-06-29 at 09 52 43


title: "Report"

output:
html_document: default


knitr::opts_chunk$set(echo = FALSE)
#bibliotecas usadas
library(tidyverse)
library(gt)

   head(mtcars) %>% gt() %>% tab_footnote("footnote blah blah", locations=cells_title())

\
\

for( i in 1:3)
{
  cat("\n### Some Header H3\n")
  cat("blah blah blah blah blah blahblah blah blah blah blah blah blah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah blah blah.\n\n")
  
  print(
      head(mtcars) %>% gt() %>% tab_footnote("footnote blah blah", locations=cells_title())
  )
  
}
   
@ddsjoberg
Copy link
Contributor

I came to report the same issue. Here's another example of the formatting issue for the footnotes when printed within a loop: https://rpubs.com/ddsjoberg/688904

image

Thank you! 🍁

@rich-iannone rich-iannone added this to the FUTURE milestone Aug 22, 2022
@rich-iannone
Copy link
Member

With the latest version of gt, this doesn't work at all. I don't think we'll support this usage because fixing it will probably increase the risk of other problems.

@olivroy olivroy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
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

4 participants