used_here | R Documentation |
Consistent with knitr syntax highlighting, used_here()
adds a summary
table of R package & function usage to a knitted Quarto or R Markdown
document
used_here(fil = current_input())
fil |
If the usage summary is required in the document you are currently knitting, then no argument need be specified. If you want to create a summary by running just the code chunk, then it is necessary to specify the quoted name of the saved file. You should first load and attach the packages used in a fresh R session. |
If the rendered summary includes rows where the package name is multiple packages separated by a comma, this will be due to an unresolved conflict. The recommended approach is to use the 'conflicted' package.
A printed kable table with the css class "usedthese"
# Simple example which mimics a two-line script and creates
# an html table with a CSS class "usedthese"
usedthese::used_here("mean(c(1, 2, 3))\nsum(c(1, 2, 3))")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.