Learn R Programming

webchem (version 0.0.5.0)

get_wdid: Get Wikidata Item ID

Description

Get Wikidata Item ID

Usage

get_wdid(query, language = "en", first = FALSE, verbose = TRUE)

Arguments

query
character; The searchterm
language
character; the language to search in
first
logical; If TRUE return only first result.
verbose
logical; print message during processing to console?

Value

  • A character vector with the item ID and the additional attribute matched (the matched label).

Examples

Run this code
get_wdid('Triclosan', language = 'de')
get_wdid('DDT')
get_wdid('DDT', first = TRUE)

# multiple inpus
comps <- c('Triclosan', 'Glyphosate')
sapply(comps, get_wdid, language = 'en')

Run the code above in your browser using DataLab