Learn R Programming

packager (version 1.15.2)

use_bsd2clause_license: Use the BSD-2-Clause License

Description

It's my favorite and devtools provides use_mit_license only.

Usage

use_bsd2clause_license(path = ".")

Value

Invisibly NULL.

Arguments

path

Path to the package directory (see devtools::as.package).

Examples

Run this code
withr::with_dir(tempdir(),
                {
                    unlink("myPackage", recursive = TRUE)
                    usethis::create_package("myPackage", open = FALSE)
                    use_bsd2clause_license("myPackage")
                    list.files("myPackage")
                    grep("^License", readLines(file.path("myPackage",
                                                         "DESCRIPTION")))
                    readLines(file.path("myPackage", "LICENSE"))
                }
)

Run the code above in your browser using DataLab