I have a question regarding choosing a license for my R package. I started putting together some R functions that I wrote during my Master's thesis. One of the function I want to include is a modified version of a function from a GPL-3 licensed package, which differs from the original by only a few lines of code. My idea was to add the package as a public repository on my GitHub to allow people from my lab to install and access it easily. At first, I thought about a private repository, but since most of the people I worked with do not have a GitHub account, that is not a viable solution.

I have absolutely no experience with licensing and legal issues, but if I understand the copyleft concept underlying the GPL licenses correctly, I am allowed to share modified versions of other GPL-licensed packages as long as I also release them under the same GPL license and share the source code. Is my interpretation correct?

  • 1
    And give attribution, keep the credits & copyright information Commented Apr 19, 2021 at 14:20

1 Answer 1


Yes, your interpretation is correct.

If you received a package under the GPLv3 license, then any modified versions you publish (make available to others) must also be published under the GPLv3 license.

When you have multiple, independent, packages in your repository, then you can either

  1. use the same license for all of them (which would have to be the GPLv3 license if one of them must be under the GPLv3 license), or
  2. you can specify a different license for each package.

The second option gives you more flexibility, but is also slightly harder to set up correctly. As the GPL license appears to be quite widely used in the R community, the first option might be good enough anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.