Description Usage Arguments Value Examples
This is intended to replace the default knitr
printing method for
data.frame
objects and is used in the "rmd_template_dz" to automatically
render data.frame
s as reactable
s. This also adds a caption to enable the
a workaround to allow table cross-referencing in the .Rmd using
\@ref(tab:KEY)
. The solution uses htmltools
to manually add a caption
inputted through the chunk option fig.cap
and was inspired from
https://github.com/glin/reactable/issues/15.
1 |
df |
a |
options |
this will be taken as a list of a parameters inputted into the
chunk. Specifically, the |
... |
Included based off this tutorial
https://cran.r-project.org/web/packages/knitr/vignettes/knit_print.html.
Required for |
reactable html widget with a caption.
1 2 3 4 5 6 | ## Not run:
# add this line to the setup chunk of your .Rmd
# to overwrite the existing method for printing data.frames
registerS3method("knit_print", "data.frame", Rmdplate::knit_print.data.frame)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.