Learn R Programming

rpubchem (version 1.5.10)

get.synonyms: Get PubChem Compound ID's and Synonyms

Description

PubChem allows one to obtain the compound ID's and synonyms of compounds that match a search string. This function uses the PubChem Power User Gateway (PUG) REST API to supply a character vector of one or more compound names and return the compound ID's and synonyms of matching compounds. Additional information on compounds can be obtained using the get.cid function.

Usage

get.synonyms(name, idtype = NULL, quiet=TRUE)

Arguments

name
A vector of one or more compound names
idtype
The default value of NULL indicates that name should be considered a compound name. Alternative values are inchikey or cid, in which case name should be an InChI key or a Pubchem CID
quiet
If FALSE, output is verbose

Value

A data.frame with 4 columns:

Details

Processing a large number of compounds can take a long time. The PUG REST API is not designed for very large volumes (millions) of requests. In order to avoid overloading the PubChem servers, this function is limited to 5 requests per second.

See Also

get.cid