used_here {usedthese} | R Documentation |
Summarise function usage in a single document
Description
Consistent with knitr syntax highlighting, used_here()
adds a summary
table of R package & function usage to a knitted Quarto or R Markdown
document
Usage
used_here(fil = current_input())
Arguments
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. |
Details
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.
Value
A printed kable table with the css class "usedthese"
Examples
# 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))")
[Package usedthese version 0.5.0 Index]