Learn R Programming

webchem (version 0.0.5.0)

get_etoxid: Get ETOX ID

Description

Query ETOX: Information System Ecotoxicology and Environmental Quality Targets https://webetox.uba.de/webETOX/index.do for their substance ID

Usage

get_etoxid(query, mult = c("all", "first", "best", "ask", "na"),
  verbose = TRUE)

Arguments

query
character; The searchterm
mult
character; How should multiple hits be handeled? 'all' returns all matched IDs, 'first' only the first match, 'best' the best matching (by name) ID, 'ask' is a interactive mode and the user is asked for input, 'na' returns NA if multiple hits are found.
verbose
logical; print message during processing to console?

Value

  • A character vector with the substance ID and additional attributes matched (the matched substance name) and d (either the string distance to the match, or the type of match).

See Also

get_etoxid to retrieve ETOX IDs, etox_basic for basic information, etox_targets for quality targets and etox_tests for test results.

Examples

Run this code
# might fail if API is not available
get_etoxid('Triclosan')
# multiple inpus
comps <- c('Triclosan', 'Glyphosate')
sapply(comps, get_etoxid)

Run the code above in your browser using DataLab