Retrieve Data from PubChem PUG REST API
get_pug_rest.Rd
This function sends a request to the PubChem PUG REST API to retrieve various types of data for a given identifier. It supports fetching data in different formats and allows saving the output.
Usage
get_pug_rest(
identifier = NULL,
namespace = "cid",
domain = "compound",
operation = NULL,
output = "JSON",
searchtype = NULL,
property = NULL,
options = NULL,
saveFile = FALSE,
saveImage = FALSE,
dpi = 300
)
Arguments
- identifier
A single identifier for the query, either numeric or character.
- namespace
A character string specifying the namespace for the request. Default is 'cid'.
- domain
A character string specifying the domain for the request. Default is 'compound'.
- operation
An optional character string specifying the operation for the request.
- output
A character string specifying the output format. Possible values are 'JSON', 'JSONP', 'XML', 'CSV', 'TXT', and 'PNG'. Default is 'JSON'.
- searchtype
An optional character string specifying the search type.
- property
An optional character string specifying the property for the request.
- options
A list of additional options for the request.
- saveFile
A logical value indicating whether to save the output as a file. Default is FALSE.
- saveImage
A logical value indicating whether to save the output as an image. Default is FALSE.
- dpi
An integer specifying the DPI for image output. Default is 300.