Learn R Programming

webchem (version 0.5.0)

pc_synonyms: Search synonyms in pubchem

Description

Search synonyms using PUG-REST, see https://pubchem.ncbi.nlm.nih.gov/.

Usage

pc_synonyms(
  query,
  from = "name",
  choices = NULL,
  verbose = TRUE,
  arg = NULL,
  interactive = 0,
  ...
)

Arguments

query

character; search term.

from

character; type of input, can be one of 'name' (default), 'cid', 'sid', 'aid', 'smiles', 'inchi', 'inchikey'

choices

to get only the first synonym, use choices = 1, to get a number of synonyms to choose from in an interactive menu, provide the number of choices you want or "all" to choose from all synonyms.

verbose

logical; should a verbose output be printed on the console?

arg

character; optinal arguments like 'name_type=word' to match individual words.

interactive

deprecated. Use the choices argument instead

...

optional arguments

Value

a character vector.

References

Wang, Y., J. Xiao, T. O. Suzek, et al. 2009 PubChem: A Public Information System for Analyzing Bioactivities of Small Molecules. Nucleic Acids Research 37: 623<U+2013>633.

Kim, Sunghwan, Paul A. Thiessen, Evan E. Bolton, et al. 2016 PubChem Substance and Compound Databases. Nucleic Acids Research 44(D1): D1202<U+2013>D1213.

Kim, S., Thiessen, P. A., Bolton, E. E., & Bryant, S. H. (2015). PUG-SOAP and PUG-REST: web services for programmatic access to chemical information in PubChem. Nucleic acids research, gkv396.

Examples

Run this code
# NOT RUN {
pc_synonyms('Aspirin')
pc_synonyms(c('Aspirin', 'Triclosan'))
pc_synonyms(5564, from = 'cid')
pc_synonyms(c('Aspirin', 'Triclosan'), choices = 10)
# }

Run the code above in your browser using DataLab