get_license: extract the licenses used by a package

Description Usage Arguments Details Value See Also Examples

Description

when provided with package metadata, get_license extracts each unique license a package is released under and provides them as a vector.

Usage

1
get_license(package_metadata)

Arguments

package_metadata

package metadata retrieved with get_package_metadata, or the name of a package (in which case get_package_metadata will be called internally).

Details

license information is not stored in a tremendously consistent way, but we can make a best-guess at it by stripping out "+ file license" strings, and then splitting on |.

Value

a character vector containing each unique license mentioned in the package's DESCRIPTION field.

See Also

the package index for more checks and functionality.

Examples

1
2
#What license(s) are urltools under?
get_license(get_package_metadata("urltools"))

Ironholds/practice documentation built on May 7, 2019, 6:41 a.m.