Learn R Programming

PubChemR (version 2.1.3)

synonyms: Getter function for 'Synonyms'

Description

Extracts synonym data from a PubChem request using the function get_synonyms.

Usage

synonyms(object, ...)

# S3 method for PubChemInstance_Synonyms synonyms(object, .to.data.frame = TRUE, ...)

Value

A data.frame (or list) object containing the synonym data.

Arguments

object

An object of class 'PubChemInstance_Synonyms'.

...

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.

Examples

Run this code
syns <- get_synonyms(identifier = c("aspirin", "caffeine"), namespace = "name")
synonyms(syns)

Run the code above in your browser using DataLab