licenses: License a package

Description Usage Arguments Details See Also

Description

Adds the necessary infrastructure to declare your package as licensed with one of these popular open source licenses:

Permissive:

Copyleft:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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 "package name authors"; you should only change this if you use a CLA to assign copyright to a single entity.

version

License version. This defaults to latest version all licenses.

include_future

If TRUE, will license your package under the current and any potential future versions of the license. This is generally considered to be good practice because it means your package will automatically include "bug" fixes in licenses.

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.


usethis documentation built on Feb. 10, 2021, 5:08 p.m.