Title: | Summarises Package & Function Usage |
---|---|
Description: | Consistent with 'knitr' syntax highlighting, 'usedthese' adds a summary table of package & function usage to a Quarto document and enables aggregation of usage across a website. |
Authors: | Carl Goodwin [aut, cre, cph] |
Maintainer: | Carl Goodwin <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.5.0.9000 |
Built: | 2025-02-03 04:40:42 UTC |
Source: | https://github.com/cgoo4/usedthese |
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())
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))")
# 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))")
Harvests and consolidates function usage tables from pages of a Quarto website by searching for tables with the CSS class "usedthese"
used_there(url, num_links = 30)
used_there(url, num_links = 30)
url |
The url to the website listing page of posts containing usage
tables created with |
num_links |
The number of links returned from the listing page may be restricted using this argument. |
A tibble summarising package & function usage
# Uses a Quarto listing url to scrape & consolidate usage used_there("https://www.quantumjitter.com/project/", 1)
# Uses a Quarto listing url to scrape & consolidate usage used_there("https://www.quantumjitter.com/project/", 1)