Learn · Methods, in the open
More journals now ask for your analysis code at submission. You can give it a permanent, citable identity for free — a GitHub repository, a Zenodo DOI that never breaks, and, if you want it, an installable R package other people can run. This guide is the exact route, with a real worked example. No prior packaging experience needed.
After this guide you will be able to:
A GitHub link points at whatever the code looks like today. It can move, change, or disappear, and a reviewer three years from now may find something different from what you ran. A DOI (digital object identifier) points at a frozen snapshot that never changes. Zenodo, run by CERN, mints one for free and keeps the archive. That is the difference between "here is my code, probably" and a citation.
There is a second, quieter payoff. Every time someone cites your code DOI, that is a citation with your name on it — for the method you actually built, separate from the paper.
A worked example you can inspect. The analysis scripts behind our own QualiVahti Local vault are public under an open licence, with a Zenodo DOI (10.5281/zenodo.21274892) and an installable R package. Everything below is exactly how they were published — you can open the repository and copy the structure.
Put your scripts in a folder, add two small files, and push it to GitHub. The two files do the heavy lifting:
LICENSE file. Without one, code is "all rights reserved" and others cannot legally reuse it. For research scripts, a permissive licence such as Apache-2.0 or MIT lets people run and cite your code while you keep authorship. Pick one at choosealicense.com.CITATION.cff file. This is a small plain-text file that tells GitHub, and humans, exactly how to cite the code. GitHub shows a "Cite this repository" button when it is present.cff-version: 1.2.0
message: "If you use these scripts, please cite them as below."
title: "My analysis scripts"
type: software
version: 1.0.0
date-released: 2026-07-09
license: Apache-2.0
authors:
- family-names: "Surname"
given-names: "First"
orcid: "https://orcid.org/0000-0000-0000-0000"
abstract: >-
One or two sentences on what the scripts do.
v1.0.0, a title, and a short note. Publish it.Within a few minutes Zenodo archives that release and mints a DOI. You actually get two: a version DOI for this exact release, and a concept DOI that always points to the latest version. Cite the concept DOI in a paper unless you need to pin one version.
Now the sentence the reviewer is looking for. Adapt it:
Code availability. The analysis code is openly available under the Apache-2.0 licence at [GitHub URL] and archived at [DOI]. Interview recordings and transcripts are not shared, as audio is directly identifying and participants did not consent to data sharing.
That single paragraph answers the three things a reviewer checks: is the code available, is it permanent, and why is the raw data not attached. The honest data sentence is not a weakness — stating why identifying data stays private is exactly what a careful reader wants to see.
Scripts in a repo are enough for citation. But if you want other researchers to run your analysis with one line, wrap the R side as a package. The minimum is a folder with a DESCRIPTION file (name, version, author, licence), your functions in R/, and a NAMESPACE listing what is exported. Then R CMD check tells you what is missing.
To let people install it without CRAN's review queue, register the repository with R-universe — a free build service. Once registered, anyone runs:
install.packages("yourpackage",
repos = "https://youruser.r-universe.dev")
Package: yourpackage
Type: Package
Title: What It Does In A Line
Version: 1.0.0
Authors@R: person("First", "Surname",
email = "you@example.org", role = c("aut", "cre"),
comment = c(ORCID = "0000-0000-0000-0000"))
Description: A sentence or two, ending with a full stop.
License: Apache License (>= 2)
Encoding: UTF-8
Our own qualitative-analysis package is published this way — a citable DOI for the archive, and install.packages("qualivahti", repos = "https://heidihelena.r-universe.dev") for anyone who wants to run it. The Python side sits on PyPI by the same logic.
Publishing code is not the same as documenting it. A DOI on an unreadable script is still a step forward, but the value shows when someone can actually follow it. Spend the extra hour on a README that says what each script does and what it expects as input. And check your own scripts for anything private — file paths with names, a stray data sample, an API key — before the repository goes public. Once it is pushed and archived, it is permanent by design.
You do not need our tools to do any of this. The steps above work for any analysis code, in any field.
If you work with interviews and want the whole local workflow — transcription, AI-assisted coding under human review, an audit trail, and analysis scripts already published with a DOI — QualiVahti Local packages it, and ships the exact citation guide its buyers put in their methods sections.
See QualiVahti Local — €49Start upstream with transcribing interviews offline with Whisper. More local-first research guides are on the Learn page.