Skip to content
ethanbassPublic

About

Import citations from R directly to a local Zotero library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

r2zotero r2zotero hex logo: an engraved card-catalog drawer labelled R–Z

Last commit stability-experimental r-universe status badge

R2zotero aims to facilitate citation of R packages by importing citations from an R package's 'CITATION' file directly to a local Zotero library using the Zotero Web API.

Installation

You can install the development version of r2zotero from GitHub with:

# install.packages("pak")
pak::pak("ethanbass/r2zotero")

or from r-universe:

install.packages("r2zotero", repos="https://ethanbass.r-universe.dev/")

Example

To send a citation to Zotero:

library(r2zotero)
r2zotero("lattice")

To cite several packages at once, pass a vector of names. To skip citations already in your Zotero library, add skip_duplicates = TRUE. This needs Zotero's local API, which you can turn on under Settings > Advanced > Allow other applications on this computer to communicate with Zotero.

# every attached package
r2zotero(names(sessionInfo()$otherPkgs))

# the packages a project's code loads
r2zotero(renv::dependencies()$Package)

# every package in an renv lockfile, including indirect dependencies
r2zotero(names(jsonlite::read_json("renv.lock")$Packages))

Logo

The card catalog in the logo is an engraving from James Duff Brown's Manual of Library Classification and Shelf Arrangement (1898), via Wikimedia Commons.

About

Import citations from R directly to a local Zotero library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages