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
{{ message }}
Repository navigation
gtsave() to RTF file issue when used in an Rmd file #674
If I run the code below in RStudio the resulting .rtf file is created and can be viewed by TextEdit just fine:
library(gt)
gtsave(gt(mtcars), "test.rtf")
However if I put it into an Rmd file and knit to HTML, the .rtf file that is outputted is the same but contains in addition some strange tags (!!!!!RAW-KNITR-CONTENT and RAW-KNITR-CONTENT!!!!!) that cause the file to be unreadable by TextEdit and other errors. These seem like they are placed by knitr but I can’t tell if it’s a bug or if I’m using the function incorrectly on my end?
Does anyone have any suggestions for this issue? It's still happening for me. As an example, if I knit the very simple code below from an Rmd file to either PDF or HTML the test.rtf file contains the strange tags as I described before and cannot be opened:
Activity
twu13 commentedon Mar 22, 2022
Does anyone have any suggestions for this issue? It's still happening for me. As an example, if I knit the very simple code below from an Rmd file to either PDF or HTML the
test.rtffile contains the strange tags as I described before and cannot be opened:jpattee commentedon Jul 8, 2022
Looks like this is a continued issue - unfortunately renders the package near-unusable with my workflow. Any solutions?
twu13 commentedon Jul 9, 2022
@jpattee I have a manual workaround where I read the file in and strip out those strange tags...
Hopefully this issue can be fixed!
[-]gtsave to rtf file issue when used in an Rmd[/-][+]`gtsave()` to RTF file issue when used in an Rmd file[/+]rich-iannone commentedon Dec 10, 2022
Fixed by #1153.