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.
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 the PubChem request. |
Value
An object of class 'PubChemInstance_SIDs', which is a list containing information retrieved from the PubChem database. Substance IDs can be extracted from the returned object using the SIDs function.
Examples
result <- get_sids(
identifier = c("aspirin", "ibuprofen"),
namespace = "name"
)
# Extract substance IDs of all compounds
SIDs(result)
[Package PubChemR version 2.0 Index]