R Package Licensing Guide
This skill covers everything about licensing R packages, from choosing the right license to properly handling bundled third-party code. Proper licensing is essential for CRAN submission and legal compliance.
Rules
- Every package must have a license specified in DESCRIPTION
- Use standard license identifiers (MIT, GPL-3, Apache-2.0, etc.)
- MIT requires LICENSE file with YEAR and COPYRIGHT HOLDER
- GPL-3 allows use in other GPL software only
- Check license compatibility before bundling code
- Copyright holders get cph role in Authors@R
- Stack Overflow code is CC-BY-SA (GPL-3 compatible only)
- Data can have different licenses from code (e.g., CC0)
- Proprietary licenses need CRAN approval before submission
- Bundle third-party code only with compatible licenses