get_substances {PubChemR} | R Documentation |
Retrieve Substances from PubChem
Description
This function sends a request to PubChem to retrieve substance data based on the specified parameters.
Usage
get_substances(identifier, namespace = "sid", operation = NULL, options = NULL)
Arguments
identifier |
A vector of substance identifiers, either numeric or character.
The type of identifier depends on the |
namespace |
A character string specifying the namespace of the identifier. Possible values include: - - - - - - For more details, see the Input section of the PUG REST API. |
operation |
A character string specifying the operation to perform. Possible values include: - - - - - - - - - If For a full list of operations, see the Operations 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. |
Details
For more detailed information, please refer to the PubChem PUG REST API documentation.
Value
An object of class 'PubChemInstanceList' containing all the substance information of requested compounds.
Examples
subs <- get_substances(
identifier = c("aspirin", "ibuprofen"),
namespace = "name"
)
instance(subs, "aspirin")
retrieve(instance(subs, "aspirin"), "source")