instance {PubChemR} | R Documentation |
Retrieve Information for Requested Instances
Description
This function extracts the results of a PubChem instance from an object
. It is designed to retrieve
information about a compound from a comprehensive list where multiple elements (such as assay, compound, etc.) are requested.
Usage
instance(object, ...)
## S3 method for class 'PubChemInstanceList'
instance(object, .which = NULL, ...)
Arguments
object |
An object of class |
... |
Additional arguments passed to other methods. Currently, these have no effect. |
.which |
A string specifying which instance's results to return. If NULL, the results of the first instance in
the |
Examples
compounds <- get_compounds(
identifier = c("aspirin", "ibuprofen"),
namespace = "name"
)
instance(compounds) # Returns the results for "aspirin"
instance(compounds, "ibuprofen")
[Package PubChemR version 2.0 Index]