synonyms {PubChemR} | R Documentation |
Getter function for 'Synonyms'
Description
Extracts synonym data from a PubChem request using the function get_synonyms.
Usage
synonyms(object, ...)
## S3 method for class 'PubChemInstance_Synonyms'
synonyms(object, .to.data.frame = TRUE, ...)
Arguments
object |
An object of class |
... |
Additional arguments passed to other methods. Currently, these have no effect. |
.to.data.frame |
a logical. If TRUE, returned object will be forced to be converted into a data.frame (or tibble). If failed to convert into a data.frame, a list will be returned with a warning. Be careful for complicated lists (i.e., many elements nested within each other) since it may be time consuming to convert such lists into a data frame. |
Value
A data.frame
(or list
) object containing the synonym data.
Examples
syns <- get_synonyms(identifier = c("aspirin", "caffeine"), namespace = "name")
synonyms(syns)
[Package PubChemR version 2.0 Index]