Chapter 3 Licenses in the R World

3.1 R license

licence()
## 
## This software is distributed under the terms of the GNU General
## Public License, either Version 2, June 1991 or Version 3, June 2007.
## The terms of version 2 of the license are in a file called COPYING
## which you should have received with
## this software and which can be displayed by RShowDoc("COPYING").
## Version 3 of the license can be displayed by RShowDoc("GPL-3").
## 
## Copies of both versions 2 and 3 of the license can be found
## at https://www.R-project.org/Licenses/.
## 
## A small number of files (the API header files listed in
## R_DOC_DIR/COPYRIGHTS) are distributed under the
## LESSER GNU GENERAL PUBLIC LICENSE, version 2.1 or later.
## This can be displayed by RShowDoc("LGPL-2.1"),
## or obtained at the URI given.
## Version 3 of the license can be displayed by RShowDoc("LGPL-3").
## 
## 'Share and Enjoy.'

3.1.1 What does that license imply?

From the GNU GPL FAQ:

Does the GPL have different requirements for statically vs dynamically linked modules with a covered work? (#GPLStaticVsDynamic)

No. Linking a GPL covered work A 'covered work' means either the unmodified Program or a work based on the Program. (GPL-3 license) statically or dynamically with other modules is making a combined work based on the GPL covered work. Thus, the terms and conditions of the GNU General Public License cover the whole combination. See also What legal issues come up if I use GPL-incompatible libraries with GPL software?

3.1.2 GPL-compatible licenses

https://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses

Click to show the list of licenses

  • GNU General Public License (GPL) version 3
  • GNU General Public License (GPL) version 2
  • GNU Lesser General Public License (LGPL) version 3
  • GNU Lesser General Public License (LGPL) version 2.1
  • GNU Affero General Public License (AGPL) version 3
  • GNU All-Permissive License
  • Apache License, Version 2.0
  • Artistic License 2.0
  • Clarified Artistic License
  • Berkeley Database License
  • Boost Software License
  • Modified BSD license
  • CeCILL version 2
  • The Clear BSD License
  • Cryptix General License
  • eCos license version 2.0
  • Educational Community License 2.0
  • Eiffel Forum License, version 2
  • EU DataGrid Software License
  • Expat License
  • FreeBSD license
  • Freetype Project License
  • Historical Permission Notice and Disclaimer
  • License of the iMatix Standard Function Library
  • License of imlib2
  • Independent JPEG Group License
  • Informal license
  • Intel Open Source License
  • ISC License
  • Mozilla Public License (MPL) version 2.0
  • NCSA/University of Illinois Open Source License
  • License of Netscape JavaScript
  • OpenLDAP License, Version 2.7
  • License of Perl 5 and below
  • Public Domain
  • License of Python 2.0.1, 2.1.1, and newer versions
  • License of Python 1.6a2 and earlier versions
  • License of Ruby
  • SGI Free Software License B, version 2.0
  • Standard ML of New Jersey Copyright License
  • Unicode, Inc. License Agreement for Data Files and Software
  • Universal Permissive License (UPL)
  • The Unlicense
  • License of Vim, Version 6.1 or later
  • W3C Software Notice and License
  • License of WebM
  • WTFPL, Version 2
  • WxWidgets Library License
  • X11 License
  • XFree86 1.1 License
  • License of ZLib
  • Zope Public License, versions 2.0 and 2.1

3.2 Package Licenses

3.2.1 “Officially Authorized” Licenses

From R Licenses.

  • The “GNU Affero General Public License” version 3
  • The “Artistic License” version 2.0
  • The “BSD 2-clause License”
  • The “BSD 3-clause License”
  • The “GNU General Public License” version 2
  • The “GNU General Public License” version 3
  • The “GNU Library General Public License” version 2
  • The “GNU Lesser General Public License” version 2.1
  • The “GNU Lesser General Public License” version 3
  • The “MIT License”
  • The “Creative Commons Attribution-ShareAlike International License” version 4.0

=> Note : CC-BY-CA & BSD clause are not GPL-Compatible

3.2.2 From Bioconductor

“Core Bioconductor packages are typically licensed under Artistic-2.0”

BioConductor Package Guidelines

3.2.3 The ten most used in packages

db %>%
  count(clean_license, sort = TRUE) %>%
  top_n(10)
## Selecting by n

3.3 Classification

From The Free-Libre / Open Source Software (FLOSS) License Slide

  • Permissive
  • Weakly Permissive
  • Strongly Protective
  • Network Protective

From Comparison of free and open-source software licenses

library(rvest)
url <- read_html("https://en.wikipedia.org/wiki/Comparison_of_free_and_open-source_software_licenses")
tbl <- url %>% 
  html_node("table") %>% 
  html_table()
tbl <- tbl %>%
  filter(License %in% c(
    "GNU Affero General Public License", "Artistic License", "BSD License", 
    "GNU General Public License", "GNU Lesser General Public License", 
    "MIT license / X11 license", "CC-BY-SA"
  )) %>% 
  mutate_all(~gsub("\\[[0-9]*\\]", "", .x))
tbl %>%
  select(License, Linking, Distribution, Modification, `Patent grant`,`Private use`,Sublicensing, `TM grant`)
  • Linking - linking of the licensed code with code licensed under a different license (e.g. when the code is provided as a library)
  • Distribution - distribution of the code to third parties
  • Modification - modification of the code by a licensee
  • Patent grant - protection of licensees from patent claims made by code contributors regarding their contribution, and protection of contributors from patent claims made by licensees
  • Private use - whether modification to the code must be shared with the community or may be used privately (e.g. internal use by a corporation)
  • Sublicensing - whether modified code may be licensed under a different license (for example a copyright) or must retain the same license under which it was provided
  • Trademark grant - use of trademarks associated with the licensed code or its contributors by a licensee

3.4 “Non-standard”

3.4.1 Region-based licenses

Example: CeCILL - http://www.cecill.info/

db$clean_license %>%
  grep(pattern = "cecill", x = ., value = TRUE) %>%
  length()
## [1] 24

3.5 Restrictive licenses

db %>% 
  filter(license_restricts_use == "yes") %>%
  select(package, license)
  • ACM

  • CC BY-NC-SA 4.0

-> Do not allow to have commercial use of the code.

  • Artistic-2.0