Licensing a new package that includes code from another package


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.


I’m no lawyer, but I doubt many people here are, so here’s my interpretation.

Looking at Writing R Extensions on CRAN, there’s some advice about crediting others’ work in the DESCRIPTION file.

  • You’re right to list yourself as the creator in the Authors field. You should also credit any other authors of code in the package (i.e., the dplyr authors) as authors.
  • In this case, add the line Copyright: file COPYRIGHTS. Then add a file named COPYRIGHTS to the inst folder. In it, describe you hold the copyright to most of the code. Then specify that some of the code in file progress.R is copyrighted by R Studio, and copy-paste the MIT license from dplyr.

Keep the dplyr MIT license in comments above the section of code you adapted. That alone should be enough to meet the license’s requirements.

Ultimately, you should send an email to R Studio asking what they’d be comfortable with. Hopefully, they’ll have their lawyer(s) look it over and either approve or explain what to change.