Learn R Programming

packager (version 1.9.0)

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 = ".")

Arguments

path

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

Value

Invisibly NULL.

Examples

Run this code
# NOT RUN {
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