get_synonyms {PubChemR}R Documentation

Retrieve Synonyms from PubChem

Description

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.

Usage

get_synonyms(
  identifier,
  namespace = "cid",
  domain = "compound",
  searchtype = NULL,
  options = NULL
)

Arguments

identifier

A character or numeric value specifying the identifier for the request.

namespace

A character string specifying the namespace for the request. Default is 'cid'.

domain

A character string specifying the domain for the request. Default is 'compound'.

searchtype

A character string specifying the search type. Default is NULL.

options

Additional arguments passed to PubChem request.

Value

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.

Examples

syns <- get_synonyms(
  identifier = "aspirin",
  namespace = "name"
)

synonyms(syns)


[Package PubChemR version 2.0 Index]