| licenses {usethis} | R Documentation |
License a package
Description
Adds the necessary infrastructure to declare your package as licensed with one of these popular open source licenses:
Permissive:
-
MIT: simple and permissive.
-
Apache 2.0: MIT + provides patent protection.
Copyleft:
-
GPL v2: requires sharing of improvements.
-
GPL v3: requires sharing of improvements.
-
AGPL v3: requires sharing of improvements.
-
LGPL v2.1: requires sharing of improvements.
-
LGPL v3: requires sharing of improvements.
Creative commons licenses appropriate for data packages:
See https://choosealicense.com for more details and other options.
Alternatively, for code that you don't want to share with others,
use_proprietary_license() makes it clear that all rights are reserved,
and the code is not open source.
Usage
use_mit_license(copyright_holder = NULL)
use_gpl_license(version = 3, include_future = TRUE)
use_agpl_license(version = 3, include_future = TRUE)
use_lgpl_license(version = 3, include_future = TRUE)
use_apache_license(version = 2, include_future = TRUE)
use_cc0_license()
use_ccby_license()
use_proprietary_license(copyright_holder)
Arguments
copyright_holder |
Name of the copyright holder or holders. This
defaults to |
version |
License version. This defaults to latest version all licenses. |
include_future |
If |
Details
CRAN does not permit you to include copies of standard licenses in your
package, so these functions save the license as LICENSE.md and add it
to .Rbuildignore.
See Also
For more details, refer to the the license chapter in R Packages.