10

I am reading about licenses. What kind of license is the best license for an R package?

I do like Creative Commons a lot but it is not recommended for software. Their own website says "We recommend against using Creative Commons licenses for software." (source: https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software)

I wonder if giving my R package a CC 4.0 license is against R good practises. I did not find information about this specific topic.

pachadotdev
  • 3,345
  • 6
  • 33
  • 60

1 Answers1

13

GNU GPL (preferably v3) is the standard choice for "fairness". This enforces anyone else who wants to modify or redistribute your code to also provide the source code.

The MIT (a.k.a. Expat or X11), modified and simplified BSD, and Apache 2.0 licenses allow more freedom for people wanting to use your code in a commercial context.

If you don't really care what people do with your code, set "License: Unlimited" in the DESCRIPTION file.

Further info: Pick a license, any license

Here's part of a document from a company that I worked at that created commercial software. Software provided under any of the licences marked "Allowed" were OK to be included in commercial software. Software under "Restricted Use" licenses could be used for analyses and other internal use, but not included in the commercial software. Software under any other license was forbidden for use.

licenses allowed at my previous company

Richie Cotton
  • 118,240
  • 47
  • 247
  • 360
  • I voted to close, that being said I appreciated this answer greatly +1 – Tyler Rinker Jul 24 '16 at 05:37
  • 1
    @TylerRinker Yeah, this is off-topic but an important question. – Richie Cotton Jul 24 '16 at 05:39
  • 6
    Another good site for license choice is [tldrlegal.com](https://tldrlegal.com/) with the tagline _Software Licenses in Plain English_. – Dirk Eddelbuettel Jul 24 '16 at 06:15
  • 1
    @RichieCotton answer is amazing !! googling you can end up reading lots of pages with legal content but nothing like his answer. Is it true that my question is not totally objective but some practitioners can provide their opinion that contributes a lot to have more lights on this. – pachadotdev Jul 25 '16 at 07:16
  • 2
    However, as [Pol Van Aubel](https://stackoverflow.com/users/1651821/pol-van-aubel), said: "Even if you don't really care what people do with your code, use a license that imparts that, e.g. Creative Commons CC0. Do not set "License: Unlimited" in the DESCRIPTION file. Contrary to what "unlimited" might lead you to believe, this defers to the default limitations of whatever local (copyright) law is in place, which is often very restrictive if rights are not explicitly imparted in the license." – wp78de Jun 08 '18 at 02:30
  • I found it helpful to see what others use. `dplyr`'s licence is listed as 'MIT + file LICENSE' (see [here](https://cran.r-project.org/web/packages/dplyr/dplyr.pdf)) which means it's the MIT licence and there's a [file](https://cran.r-project.org/web/packages/dplyr/LICENSE) that has another (extremely simple - 2 line) licence which simply states that dplyr is by rstudio. The [MIT](https://cran.r-project.org/web/licenses/MIT) licence basically lets anyone do anything with your code, which is probably what you want unless you were going to try to make money off your code – stevec Mar 10 '19 at 13:04