Gets a field such a label or description from a dataframe typically generated with tw_get()
Source: R/tw_get_field.R
tw_get_field.Rd
Gets a field such a label or description from a dataframe typically generated with tw_get()
Usage
tw_get_field(df, field, id, language = tidywikidatar::tw_get_language())
Arguments
- df
A data frame typically generated with
tw_get()
. It should include data for theid
included in the dedicated parameter.- field
A character vector of length one. Typically, either "label" or "description".
- id
A character vector, typically of Wikidata identifiers. The output will be of the same length and in the same order as the identifiers provided with this parameter.
- language
Defaults to language set with
tw_set_language()
; if not set, "en". Use "all_available" to keep all languages. For available language values, see https://www.wikidata.org/wiki/Help:Wikimedia_language_codes/lists/all