Skip to content

How to include pre-rendered tables? #11067

Answered by roaldarbol
roaldarbol asked this question in Q&A
Discussion options

You must be logged in to vote

In conclusion (as of today), future fellow R strugglers, who need to output your tables and import them into a Quarto project:

  • Export. Export to HTML; but NOT with gt::gtsave(), use one of the ways in #11067 (reply in thread).
  • Import. You can include your table in a {=html} block:
```{=html}
{{< include "table.html" >}}
```

BONUS:
If you want to be able to reference the table and give it a caption, you can simply place the {=html} block inside a table environment:

:::{#tbl-my-table}
```{=html}
{{< include "table.html" >}}
```
My interesting caption.
:::

Many thanks @mcanouil and @gordonwoodhull for the help!

Replies: 4 comments 17 replies

Comment options

You must be logged in to vote
10 replies
@roaldarbol
Comment options

@mcanouil
Comment options

@gordonwoodhull
Comment options

@roaldarbol
Comment options

@mcanouil
Comment options

Comment options

You must be logged in to vote
4 replies
@roaldarbol
Comment options

@gordonwoodhull
Comment options

@cscheid
Comment options

@roaldarbol
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by roaldarbol
Comment options

You must be logged in to vote
3 replies
@roaldarbol
Comment options

@cderv
Comment options

@allefeld
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
tables Issues with Tables including the gt integration includes html Issues with HTML and related web technology (html/css/scss)
6 participants