Site icon R-bloggers

Make Your R Package Easier to Cite

[This article was first published on rOpenSci - open tools for open science, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Scientists rarely cite research software they use as part of a research project. As a consequence, the software and the time spent developing and maintaining it becomes an invisible scholarly contribution. Furthermore, this lack of visibility means that incentives to produce high quality, sustainable software are missing. Among many reasons why software is not cited, one is the lack of a clear citation information from package developers. In this tech note we provide some tips on how to make it really easy to cite your software.

Just learned that the {webchem} package was cited in a paper by a group of oncologists. It totally made my morning to think that my code might someday contribute a teensy tiny bit to better treatments for cancer. #ropensci #webchem https://t.co/MtpxKvZVhO

— Eric Scott, PhD (@LeafyEricScott) June 18, 2020

We shall also give some insights on hurdles the users of your package might face when wanting to cite your package, as well as a brief presentation of our monitoring of the literature to find use cases of our packages. We are planning to include this topic in our package dev guide. By commenting on this post you can help us strengthen our package citation guidance! Thanks to Adam Sparks for commenting on a draft of this post!

🔗 Clear citation rules for your package

< !--html_preserve-->

Why didn’t you cite my package?! cottonbro on Pexels.

< !--/html_preserve-->

To make it really easy for users to cite your package, you should store citation metadata in the expected places and advertise it very clearly.

As an example see nasapower CITATION file that refers to both the manual and a paper. All it lacks is a Zenodo DOI for the manual – although most users would probably end up citing the JOSS paper.

citHeader("While nasapower does not redistribute the data in any way,\n",
"we encourage users to follow the requests of the POWER\n",
"Project Team:\n",
"\n",
"'When POWER data products are used in a publication, we\n",
"request the following acknowledgment be included:\n",
"These data were obtained from the NASA Langley Research\n",
"Center POWER Project funded through the NASA Earth Science\n",
"Directorate Applied Science Program.'\n",
"\n",
"To cite nasapower in publications, please use:")
citEntry(
entry = "Article",
author = as.person("Adam H Sparks"),
title = "nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R",
doi = "10.21105/joss.01035",
year = 2018,
month = "oct",
publisher = "The Open Journal",
volume = 3,
number = 30,
pages = 1035,
journal = "The Journal of Open Source Software",
textVersion = paste("Sparks, Adam (2018). nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R. Journal of Open Source Software, 3(30), 1035, https://doi.org/10.21105/joss.01035"))
year <- sub("-.*", "", meta$Date)
note <- sprintf("R package version %s", meta$Version)
bibentry(bibtype = "Manual",
title = "{nasapower}: NASA-POWER Data from R",
author = c(person("Adam", "Sparks")),
year = year,
note = note,
url = "https://CRAN.R-project.org/package=nasapower")
textVersion = paste0("Adam H Sparks, (", year, ").",
" nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R. ",
note, ".",
" https://CRAN.R-project.org/package=nasapower")

“Personally, I take a “belt-and-suspenders” approach and still put citation things in the README.” Noam Ross, rOpenSci forum

“I [advertise the citation info in the README] too, just to make it painfully obvious how to cite the work.” Adam Sparks, rOpenSci forum

Although some authors use on-load messages to encourage citations, we discourage this practice and recommend that developers highlight this information in their README and documentation.

🔗 Why is it hard to cite software?

Despite your best efforts to encourage users to cite your software, you might still run into challenges. Authors may have limits on the number of references they can cite in a journal or face resistance from their coauthors. Other authors may simply be unaware that they can use citation("packagename") to easily retrieve the citation information for an R package or that they even should cite the package because it is not something that has been commonly promoted.

These problems can’t all be fixed at once by one motivated individual (neither you the developer nor they the user), so more advocacy and teaching is needed. In the meantime, how do we adapt software citation guidelines to realistically accommodate for all situations?

🔗 How rOpenSci tracks package usage

At rOpenSci we monitor the scientific literature to discover uses and mentions of our packages that you can browse on our citations page. As sometimes packages are used but not listed in the references section, we report any usage of the packages in papers. Here’s Scott Chamberlain’s workflow.

As part of our new Moore Foundation funded effort, we are building a system to automatically detect R package citations in literature and append them to package records in R-universe. Stay tuned on our blog for more details.

🔗 Conclusion

In this post we shared guidance on how to help your R package land in the references section of the papers that used it2. We also mentioned some hurdles even well-meaning users might face, and explained how we track for usage of our packages in the scientific literature. We encourage you to share your experience and wisdom in the comments below, as we are planning to consolidate them together with our content, to add a new topic to our dev guide.

< section class="footnotes" role="doc-endnotes">
  1. Thanks to Mark Padgham for computing this in a CRAN mirror. ↩︎

  2. Note that this post is not about promoting usage of your package, which is covered briefly in the dev guide. ↩︎

To leave a comment for the author, please follow the link and comment on their blog: rOpenSci - open tools for open science.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.