View source: R/getter_functions.R
instance | R Documentation |
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.
instance(object, ...)
## S3 method for class 'PubChemInstanceList'
instance(object, .which = NULL, ...)
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 |
compounds <- get_compounds(
identifier = c("aspirin", "ibuprofen"),
namespace = "name"
)
instance(compounds) # Returns the results for "aspirin"
instance(compounds, "ibuprofen")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.