If someone has provided a useful block of code to an R library, what is the appropriate role for them in package documentation?
I have seen contributor role given to such cases, but after reviewing the definitions of author and contributor, I believe author is the appropriate role. But there may be something else more appropriate (or perhaps both author/contributor)
Author:
A person, family, or organization responsible for creating a work that is primarily textual in content, regardless of media type (e.g., printed text, spoken word, electronic text, tactile text) or genre (e.g., poems, novels, screenplays, blogs). Use also for persons, etc., creating a new work by paraphrasing, rewriting, or adapting works by another creator such that the modification has substantially changed the nature and content of the original or changed the medium of expression
Contributor:
A person, family or organization responsible for making contributions to the resource. This includes those whose work has been contributed to a larger work, such as an anthology, serial publication, or other compilation of individual works. If a more specific role is available, prefer that, e.g. editor, compiler, illustrator
As pointed out in previous answers, the idea was to distinguish how substantial the different code contributions are. The manual page ?person
explains:
The new scheme also adds the possibility of specifying roles based on a subset of the MARC Code List for Relators (URL: https://www.loc.gov/marc/relators/relaterm.html). When giving the roles of persons in the context of authoring R packages, the following usage is suggested.
"aut"
(Author) Use for full authors who have made substantial contributions to the package and should show up in the package citation."cre"
(Creator) Use for the package maintainer."ctb"
(Contributor) Use for authors who have made smaller contributions (such as code patches etc.) but should not show up in the package citation.
Suggestions for the usage of further roles in the context of R packages are also provided there ("com"
, "cph"
, "ctr"
, "dtc"
, "fnd"
, "rev"
, "ths"
, "trl"
). The citation mentioned above is the "default" or "auto" citation that you get from citation("foo")
if package "foo" has no dedicated CITATION file. If it has you can still get the default by citation("foo", auto = TRUE)
. See ?citation
for more details.
Coming back to the question of "author" vs. "contributor": When we wrote the documentation above (and the accompanying paper by Hornik et al. in The R Journal) we deliberately just gave rough guidelines because the ultimate decision what is "substantial enough" needs to be made by the package authors themselves. This is not unsimilar to the decision who to include in the author list of a scientific paper vs. mentioning in the acknowledgments - for which the practices also vary a lot across disciplines/communities.
A strategy that is not uncommon is to distinguish three levels of contribution:
Reference: Hornik K, Murdoch D, Zeileis A (2012). "Who Did What? The Roles of R Package Authors and How to Refer to Them." The R Journal, 4(1), 64-69. doi:10.32614/RJ-2012-009