Should I cite all R packages I used?

YES.

There are lots of reasons to and no reasons not to (unless you're under some kind of strange space/ink constraint).

Here is an important and underappreciated reason why:

Most of the people who make the kind's of R packages, in fact the people who made R itself, are other academics. Meaning: They didn't get paid specifically for the time they spent making lme4, ggplot2, stargazer etc. Software development is very unappreciated in academia. Imagine spending a lot of time writing and maintaining a package that is used by thousands of people in your field and then being asked by a tenure/promotion committee why you didn't write more papers or do more experiments. It's very difficult to get someone who isn't a user (or even a software-minded person) to properly appreciate the time and skill involved in making good software.

The only way to convince university systems and leaders that the work you spent writing that software is to show them in a way they understand, that means citations. They're not going to care about your StackExchange reputation or how much juice you've got on github, they need something Scopus can compute and they can itemize and count.

Much of the workings of academia is based on beans. Much of the effort at universities is dedicated to counting and managing those beans. How many students are in your program, how many grants are awarded, how many Ph.D. defend, and how many papers are published and cited are all very important beans which decide who gets resources. It would be sad indeed if someone who wrote a useful R package didn't get the credit they're due and thus be allowed to make more wonderful tools. Imagine if Hadley hadn't started working for R-Studio, he might be standing in front of some committee someday asking him why he spent so much time writing "software" instead of "papers," or trying to explain why he can't take on a third course this semester because the dept chair doesn't understand that writing software is something that actually takes real time.

Also consider this: Most scientific papers are cited fewer than 10x, if ever. A reasonably useful R package is likely to impact many more people than any "real" publication, but that person get's no credit if you don't cite it.


Overall, I would suggest you err on the side of rather citing too many packages (with version numbers, please!), although odd quite probably is a borderline case. I'd rationalize this tendency as a bit of balance for all the people who use packages extensively but do not cite them.

In general, I would certainly cite anything that saved me a non-trivial amount of own work (as in, "I could have done this myself, but it would likely have cost me half a day").

The length of your literature list should not really be a concern in the days of PDF publishing. And "we used R [3], packages foo [4] and bar [5] as well as multiple helper functions [6-10]" should not be too confusing to your readers.


This would possibly be more appropriate for Academia.SE.com. Perhaps you want to edit your question (explaining what R is, so the question is understandable outside the r tag at SO) and flag it for migration.


Absolutely! Citations are free, and they are a blessing to the creators of those packages. Unless you're held to a strict page limit, there's no reason not to have a "methods" section in which you list all of the packages you used. It can be a single sentence. If you want to give pride of place to a few key packages that your work relied on, then give them a sentence each, but don't snub the others. Some day, you'll be happy when others cite your work.