get_sids {PubChemR}R Documentation

Retrieve Substance IDs (SIDs) from PubChem

Description

This function sends a request to PubChem to retrieve Substance IDs (SIDs) for a given identifier. It returns a tibble (data frame) with the provided identifier and the corresponding SIDs.

Usage

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

Arguments

identifier

A numeric or character vector specifying the identifiers 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 tibble (data frame) where each row corresponds to a provided identifier and its SID. The tibble has columns 'CID' and 'SID'.

Examples

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

[Package PubChemR version 1.2 Index]