[R-pkg-devel] Acknowledging small functions from another package

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Thu May 4 10:53:34 CEST 2023


On Thu, 4 May 2023 09:21:17 +0100
David Hugh-Jones <davidhughjones using gmail.com> wrote:

> One of my packages copy-pasted some small functions (stuff like
> `%||%` for is.null) from ggplot2. (Both packages are MIT-licensed.)
> 
> What is an appropriate way to acknowledge this in the DESCRIPTION
> Author: or Authors using R section?

One way would be to mention Hadley Wickham:
https://github.com/tidyverse/ggplot2/commit/ef2f944863a0db8841bf628e9eb4a9faef5049e6#diff-8f53135445ab98749043fa52e438346bb9acae8e0185aa95f186d0aa021bb7e0
(`git blame` will also tell you that he later moved this function to a
different file).

I think that person('ggplot2 authors', role = 'cph', comment = 'The
%||% operator') is also fine, just like e.g. unitizer package mentions
the code taken from R itself.

You can also find this operator in multiple base R packages, currently
unexported (maybe some day...). They mention in the comments that the
operator is adapted from ggplot2.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list