knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

swhidit

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.

Installation

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")

Example

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:

References



nfultz/swhidit documentation built on Dec. 22, 2021, 1:17 a.m.