I am a postdoc in finance and I have just developed an R package on my own as part of a research paper with three co-authors.

At the moment, we have a methodological paper in review and I would like to submit my R package to CRAN. I am now wondering if I should add my coauthors as contributors to the package even though I am the only one who wrote all the code in the package ?

Any help would be much appreciated !

  • 3
    A good rule: if in doubt, offer co-authorship and let them decline.
    – avid
    Sep 7, 2021 at 18:06
  • If you decide to add them as coauthors, do not forget to tell/ask them. Actually, you are not loosing anything by including them. Just in contrast, you may get some valuable help in the future as the package grows. Just a curiosity, by providing info on the programing language do you assuming that there might be different considerations in the case of, e.g., FORTRAN?
    – yarchik
    Sep 8, 2021 at 13:34

3 Answers 3


The R Project core team has provided a helpful guide entitled "Who Did What? The Roles of R Package Authors and How to Refer to Them".

Like many journals these days, R package DESCRIPTION or CITATION files allow you to delineate the contributions of each individual author with three letter MARC codes. A quote from the paper linked above:

"ths" (Thesis advisor): Thesis advisor, if the package is part of a thesis.

Clearly the core team intended to make it possible to list a supervisor as an author. Note that there is also a fnd code for funders. As you may know, R includes a citation() function to help citing a package. Only some author roles appear when calling this function. Please refer to documentation for further information.

I work in medicine, and so I try to follow the NIH guidelines when determining authorship. As you can see, providing financial support alone does not confer authorship. Therefore, I would probably not include your advisor if they only provided funding.

During my PhD, I published an R package with a collaborator. I did not include my thesis advisor as an author.

  • Thank you for your input ! Well, in this case, I discussed with coauthors about the statistical methodology to use around a table but I was the only one writing the code. So, from this perspective, I believe I should only indicate myself as maintainer/author and that's all.
    – Wiles01
    Sep 7, 2021 at 15:21

I don't know of an authoritative source on this question, but an anecdote: I've personally written the code for 3 projects, i.e. there were other coauthors on the papers but none worked on the code.

None of the projects are on CRAN, but I've only ever listed myself as exclusive author or copyright holder. With a link to the preprint/paper in the README, of course. To me this is sufficient acknowledgement of their contribution: My co-authors contributed the ideas in the paper, but simply didn't write the code. None of my coauthors have every batted any eyelash, frankly I doubt they even noticed.

For supervisors particularly, I really don't think they have any claim to the code's copyright if they didn't write any of it (unless you have a different arrangement, of course).

  • Thanks. I totally agree with you. Authors or contributors of a code package should at least write one line of code, otherwise they should not be considered as such.
    – Wiles01
    Sep 9, 2021 at 12:59


They provided ideas and support, as evidenced by the fact that you are writing a related paper. You lose nothing by including them.

Indeed, include them and also offer to show them, if they are less technical, how to properly add the line to their CVs.

You gain reputation as a good actor and goodwill. Both are invaluable.

  • Thanks for your feedback. I lose partly by including them because it "dilutes" the authorship among many authors. I don't like the idea of adding "senior" researchers because... they are senior even though they didn't contribute. Especially, as a young researcher, it is important to have single-author papers and it is not true that I "lose nothing by including them".
    – Wiles01
    Sep 9, 2021 at 13:03
  • I disagree with everything you have written. It may be a difference of discipline, but I doubt it. It may be valuable to Reevaluate your entire set of beliefs surrounding this, although undoubtedly uncomfortable. Nov 1, 2021 at 4:07
  • The CRAN guidelines are clear. People listed as authors and contributors need to have some copyright claim on (parts of) the code. If they didn't write a single line then they have not contributed to the package. I agree that there are other ways to contribute though. You may have discussed structure of the package or received best practice guidance from them, then they should be included as "ths". Really we should petition the core team to add an "adv" for advisor in a more general sense as it isn't just thesis supervisors that we received advice from.
    – adunaic
    Feb 20, 2023 at 8:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .