Chapter 4 Licensing R code
Checklist about what to think about when defining your R code license.
4.1 R-package
The first question to ask is the type of linking you’re doing:
Static linking: you’re copying and pasting the code inside your package.
Dynamic linking: you’re listing a package as a dependency
4.1.1 Examples of R licence files
4.1.1.1 Simple
4.1.2 Code
4.1.2.1 Defining your code reusability
Reminder here about how the license you choose impact the way people can reuse your code.
4.1.2.2 Contribution
Discussion here about contribution to your package.
-asking people to sign a CLA - https://github.com/ropensci/unconf17/issues/32#issuecomment-294038058
- implication for changing license ({covr} example)
4.1.3 Dependencies
License compatibility questions when it comes to using dependencies in a package.
4.1.4 Data Package
How to license a data package?
Examples:
{igraphdata} has a file LICENSE with each licenses listed : https://github.com/igraph/igraphdata/blob/master/LICENSE
4.1.5 Library wrappers
4.1.5.1 Including non R code (JavaScript, C++, CSS…)
How should a code wrapper be licensed?
Exemple: include others as role="ctb"
with LICENSE.note
: see for example {leaflet}
https://github.com/rstudio/leaflet / https://github.com/rstudio/crosstalk
4.2 Documentation
4.2.1 Software documentation
Discussion about code documentation (vignette, bookdown, blog articles…)
4.2.2 Publication
Overview of license requirements (if any) for publication in journals.
Example: JSS
“Code needs to include the GNU General Public Licence (GPL), versions GPL-2 or GPL-3, or a GPL-compatible license for publication in JSS.”