View source: R/get_substances.R
get_substances | R Documentation |
This function sends a request to PubChem to retrieve substance data based on the specified parameters.
get_substances(identifier, namespace = "sid", operation = NULL, options = NULL)
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. |
For more detailed information, please refer to the PubChem PUG REST API documentation.
An object of class 'PubChemInstanceList' containing all the substance information of requested compounds.
subs <- get_substances(
identifier = c("aspirin", "ibuprofen"),
namespace = "name"
)
instance(subs, "aspirin")
retrieve(instance(subs, "aspirin"), "source")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.