Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Properly License R Package that Includes Other MIT Code

Tags:

r

Hoping for some wisdom and guidance about licensing an R package I created.

My package, knitrProgressBar, rips out the dplyr::progress_estimated internal function into essentially it's own package (to avoid some dependencies and do some custom things with it), and then adds some code for decision logic.

I would like to properly license my package (using the MIT license), and give proper attribution so that others don't have issues using it (and it can be released via CRAN).

dplyr is licensed under MIT, with RStudio as the copyright holder, and various individuals listed as authors under Authors at R.

I understand I would list myself as the "creator" in the Authors at R field for knitrProgressBar, but I'm not sure who should be listed as authors and copyright holders, and how this information needs to be incorporated into the LICENSE file.

Guidance would be very much appreciated.

like image 580
rmflight Avatar asked Jan 30 '18 15:01

rmflight


People also ask

What license should I use for my R package?

We recommend one of two Creative Commons licenses: If you want to make the data as freely available as possible, you use the CC0 license with use_cc0_license() . This is a permissive license that's equivalent to the MIT license (but applies to data, not code).

What does a packages in R consist of?

R packages contain code, data, and documentation in a standardised collection format that can be installed by users of R, typically via a centralised software repository such as CRAN (the Comprehensive R Archive Network).

Can you copyright R code?

While it might technically possible to copyright libraries, R is an "open" community in that the language is not only open source, but the vast majority of libraries and tools fall under some sort of open philosophy license like Apache, GNU, MIT, etc.

Is R free for commercial use?

It is the opinion of the R Core Team that one can use R for commercial purposes (e.g., in business or in consulting). The GPL , like all Open Source licenses, permits all and any use of the package. It only restricts distribution of R or of other programs containing code from R.


1 Answers

I finally got an answer somewhere else, and am posting it here so that others can benefit.

The way to do this is:

  • for any code taken from another package, include the original license text (in this case the MIT license text from the dplyr GitHub repo) in the file
  • Comment on modifications made to that code in the file itself
  • Include the authors of the dplyr package as contributors (ctb in Authors@R), with a comment that they are authors on the dplyr code
  • Include RStudio as a copyright holder (cph), with a comment that they are the copyright holders of the dplry code
  • Include myself as the author / creator of my package

So this should look like:

Authors@R: c(
person("Robert", "Flight", email = "email", role = c("aut", "cre")),
person("Hadley", "Wickham", role = c("ctb"), comment = "Author of included dplyr fragments"),
person("Romain", "Francois", role = "ctb", comment = "Author of included dplyr fragments"),
person("Lionel", "Henry", role = "ctb", comment = "Author of included dplyr fragments"),
person("Kirill", "Müller", role = "ctb", comment = "Author of included dplyr fragments"),
person("RStudio", role = "cph", comment = "Copyright holder of included dplyr fragments")
)

And then have the noted license text in the file with the code from dplyr.

like image 185
rmflight Avatar answered Nov 15 '22 22:11

rmflight