R 包的作者与贡献者 - 小代码贡献的角色是什么?

Author vs Contributor for R package - which role for small code contribution?

如果有人为 R 库提供了有用的代码块,他们在包文档中的适当角色是什么?

为什么重要

我曾见过为此类案例赋予贡献者角色,但在查看作者和贡献者的定义后,我认为作者是合适的角色。但可能还有其他更合适的东西(或者 both author/contributor)

library of congress 说了什么

作者:

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

贡献者:

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

可能的混淆点

我认为这是一个非常有趣的问题,我以前也想过这个问题。

遗憾的是,我认为您提供的两个定义并不像您想的那么清楚。一个问题是,根据您阅读它们的方式,您可能会争辩说作者和贡献者都是在包中编写代码的人的正确标签。只要看看定义中使用的类别中的 R 包是什么:

您可以将包视为 "work that is primarily textual in content, regardless of media type"---在这种情况下,写在上面的人将是作者---或者 "compilation of individual works"---在这种情况下,有人添加了个人工作,例如功能,将是贡献者。

在 Hadley Wickham 的书 "R packages" 中,section about the author 必须说以下内容:

  • cre: the creator or maintainer, the person you should bother if you have problems.

  • aut: authors, those who have made significant contributions to the package.

  • ctb: contributors, those who have made smaller contributions, like patches.

(原文出处好像是这篇文章:Hornik, Murdoch and Zeileis (2012)

使用贡献的大小来确定某人是作者还是贡献者似乎是处理区别的好方法。

留下什么是实质性贡献的问题。最终,我认为这必须在作者和贡献者之间进行协商。理想情况下,creator/maintainer 制定了指南,或者在可能的 PR 之前讨论了该问题。

我在此提出的一个经验法则是询问如果没有一个人的贡献该包的核心功能是否存在。如果答案是 "no" 那么这个人就是作者。如果答案是"yes, but they wouldn't work as well"我认为这个人应该是一个贡献者。

正如之前的回答中所指出的,这个想法是为了区分不同代码贡献的实质性。手册页 ?person 解释:

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.

那里还提供了在 R 包上下文中使用更多角色的建议("com""cph""ctr""dtc""fnd""rev""ths""trl")。如果包 "foo" 没有专用的 CITATION 文件,上面提到的引用是从 citation("foo") 获得的 "default" 或 "auto" 引用。如果有,您仍然可以通过 citation("foo", auto = TRUE) 获得默认值。有关详细信息,请参阅 ?citation

回到 "author" 与 "contributor" 的问题:当我们编写上面的文档时(以及 Hornik 等人的随附论文 在 R Journal 中)我们故意只给出了粗略的指导方针,因为最终决定什么是 "substantial enough" 需要由包作者自己做出。这与将谁包含在科学论文的作者列表中与在致谢中提及的决定没有什么不同——disciplines/communities.

之间的做法也有很大差异

一种常见的策略是区分三个贡献级别:

  • 那些做出非常小的贡献(如小的修复或改进)的人不会在描述中列出,但会在新闻或更新日志中得到承认。这适用于通过 bug/issue 跟踪器或 GitHub 或类似平台上的小型拉取请求所做的许多小贡献。
  • 那些提供了更大的补丁、小的辅助函数、针对特定案例的补充等的人应该在描述中列为 "conributors" (ctb)。这也适用于从其他包或其他来源复制代码部分的情况。
  • 做出更大 and/or 持续贡献的人,这些贡献足以在描述和包的 default/auto 引用中列为 "authors" (aut)。

参考文献: Hornik K、Murdoch D、Zeileis A (2012)。 "Who Did What? The Roles of R Package Authors and How to Refer to Them." R 杂志, 4(1), 64-69。 doi:10.32614/RJ-2012-009