| get_synonyms | R Documentation | 
This function sends a request to PubChem to retrieve synonyms for a given identifier. It returns a list of synonyms corresponding to the provided identifier.
get_synonyms(
  identifier,
  namespace = "cid",
  domain = "compound",
  searchtype = NULL,
  options = NULL
)
identifier | 
 A vector of identifiers, either numeric or character.
The type of identifier depends on the   | 
namespace | 
 A character string specifying the namespace of the identifier. Possible values depend on the  - For  - For  - For  For more details, see the Input section of the PUG REST API.  | 
domain | 
 A character string specifying the domain of the query. Possible values are: -  -  -  - Other domains as specified in the API documentation.  | 
searchtype | 
 An optional character string specifying the search type. Possible values depend on the  Examples include: -  -  If  For more details, see the Input section of the PUG REST API.  | 
options | 
 A list of additional options for the request. Available options depend on the specific request and the API. Examples include: - For similarity searches:  - For substructure searches:  If  For more details, see the Structure Search Operations section of the PUG REST API.  | 
The PubChem PUG REST API allows for retrieving synonyms related to various domains. The table below summarizes valid combinations for retrieving synonyms: For more detailed information, please refer to the PubChem PUG REST API documentation.
An object of class 'PubChemInstance_Synonyms', which is a list containing information retrieved from the PubChem database. Synonyms data can be extracted from the returned object using the synonyms function.
syns <- get_synonyms(
  identifier = "aspirin",
  namespace = "name"
)
syns
synonyms(syns)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.