knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of swhidit is to generate software references for R projects using
Software Heritage Foundation Persistent Identifiers.
These can provide very fine-grained information about what software packages are used, down to the commit and file hash level, that can be key for replicating or auditing findings.
knitcitations is also useful, but typically generates citation entries for linked documentation eg manuals, JSS articles rather than the software itself.
TODO: You can install the released version of swhidit from CRAN with:
install.packages("swhidit")
You can install the development version of swhidit from GitHub with:
remotes::install_github("nfultz/swhidit")
This is a basic example which shows you how to fetch SWHIDs for all attached packages in your session:
library(swhidit) library(jsonlite) swhidit()
which generates a bibtex database:
cat(readLines("swhids.bib"), sep='\n')
which is then rendered using the appropriate tools:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.