Learn R Programming

webchem (version 0.0.4.0)

chemid: Retrieve information from ChemIDPlus http://chem.sis.nlm.nih.gov/chemidplus/name/triclosan

Description

Retrieve information from ChemIDPlus http://chem.sis.nlm.nih.gov/chemidplus/name/triclosan

Usage

chemid(query, type = c("rn", "name", "inchikey"), verbose = TRUE)

Arguments

query
character; query string
type
character; type of query string. 'rn' for regeistry number or 'name' for common name or 'inchikey' for inchikey as input.
verbose
logical; should a verbose output be printed on the console?

Value

  • A list of 8 entries: name (vector), synonyms (vector), cas (vector), inchi (vector), inchikey (vector), smiles(vector), toxicity (data.frame), physprop (data.frame).

Examples

Run this code
# might fail if API is not available
y1 <- chemid('Formaldehyde', type = 'name')
str(y1)
y1$name

y2 <- chemid('50-00-0', type = 'rn')
str(y2)
y2$name

y3 <- chemid('50-00-0', type = 'name')
y3

Run the code above in your browser using DataLab