Learn R Programming

osi (version 0.1.0)

extract_id: Extract components from OSI metadata

Description

Elements of the metadata returned from other functions - such as license_list or license_by_keyword - can be extracted from the overarching metadata using this collection of functions, which (respectively) pull out the license ID, license name, what superseded the license, and what keywords the license has.

Usage

extract_id(metadata)
extract_name(metadata)
extract_superseded(metadata)
extract_keywords(metadata)

Arguments

metadata
a metadata object returned from license_by_keyword, license_by_id or license_list.

Value

a vector of the appropriate metadata element for each entry (or a list of vectors in the case of extract_keywords, since there can be multiple keywords per license).

Examples

Run this code

#Get the names of all licenses
all_license_metadata <- license_list()
license_names <- extract_name(all_license_metadata)

Run the code above in your browser using DataLab