Obtaining a Zenodo DOI for your R project or package

How to use Zenodo to obtain a Digital Object Identifier (DOI) for your R project or package in a GitHub repo.

Peter Higgins true
2022-04-28

There comes a time when you, or possibly others, want to cite your software code, whether as a project or a package. A DOI (Digital Object Identifier) is a unique and never-changing string assigned to online (journal) articles, books, and other works. DOIs make it easier to retrieve works, which is why citation styles, like APA and MLA Style, recommend including them in citations.

Journal articles are assigned DOIs, which look something like this: doi:10.1080/02626667.2018.1560449

A good explainer for this entire process can be found at the UC Berkeley library website here.

Zenodo is an open science research repository, which is itself open source. You can deposit your data, code, preprints, etc. and generate DOIs for citation.

Steps:

1. Put your repo on GitHub

  1. go to Zenodo
  2. The first time you do this, you need to sign up/open an account by authorizing with your GitHub login
  3. log in with GitHub ID/pwd
  4. From the drop-down menu next to your email address at the top of the Zenodo home page, select GitHub
  5. select the repository that you want to archive on Zenodo
  6. Toggle the “on” button next to the repository you want to archive

3. Creating a new release of your repo (details here)

  1. Click on the “Create Release” button at the top of the page
  2. Zenodo will redirect you back to the GitHub repo to generate a release
  3. To the right of the list of files, click on the Releases button.
  4. Click Choose a tag - and add a version number for this release, like v1.0.0.
  5. Use the drop-down menus to select the correct branch for this release.
  6. add a title and description for this release
  7. Scroll down and click the Publish release button.
  8. For future releases/versions/DOIs, just update your repo and publish a new release.

4. DOI generation

  1. every time you generate a new release (with a new version) of your repo, Zenodo will archive it, and generate a new DOI
  2. to check that it is working, go to https://zenodo.org/github-account-name/settings/github/ - you will see that your repo is listed.
  3. Scroll down your list of Enabled Repositories to your repo.
  4. Click on the repo DOI badge, and Zenodo will pop up a window with markdown code for a DOI badge that you can add to your repo README file

Citation

For attribution, please cite this work as

Higgins (2022, April 28). Medical R: Obtaining a Zenodo DOI for your R project or package. Retrieved from https://higgi13425.github.io/medical_r/posts/2022-04-28-obtaining-a-zenodo-doi-for-your-r-project-or-package/

BibTeX citation

@misc{higgins2022obtaining,
  author = {Higgins, Peter},
  title = {Medical R: Obtaining a Zenodo DOI for your R project or package},
  url = {https://higgi13425.github.io/medical_r/posts/2022-04-28-obtaining-a-zenodo-doi-for-your-r-project-or-package/},
  year = {2022}
}