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 get_json.

Value

A list where each element corresponds to the synonyms retrieved from PubChem for the provided identifier. The names of the list elements are based on the provided identifier.

Examples

get_synonyms(
  identifier = "aspirin",
  namespace = "name"
)

[Package PubChemR version 1.2 Index]