| pkrt_list | R Documentation |
Creates a list of package citations that can be converted into a
character string or data frame. This function is normally used within an R
Markdown or Quarto document, where pkrt_list() automatically references
the cited packages in the first (by default) .bib file specified in the
YAML header if no reference for the packages already exists.
pkrt_list(...)
... |
Character vectors, separated by commas, of packages to cite. |
This function automatically discards duplicate and base packages. You can use
pkrt_list() in combination with renv::dependencies() to cite all the
packages used in a project or directory.
A list of package citations with S3 class pkrt_list.
# Create a list of citations
citations <- pkrt_list("pakret", "readr", "knitr")
# You can then turn the citations into a character string
# Note that this is done automatically in inline chunks
paste(citations, collapse = ", ")
# Or a data frame
as.data.frame(citations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.