Learn R Programming

PubChemR (version 3.0.0)

pc_compound: Query Compound Records via the Next-Generation API

Description

Convenience wrapper around `pc_request()` for `compound` domain record retrieval.

Usage

pc_compound(
  identifier,
  namespace = "cid",
  operation = NULL,
  searchtype = NULL,
  output = "JSON",
  options = NULL,
  ...
)

Value

A typed `PubChemRecord` object.

Arguments

identifier

Identifier(s).

namespace

PubChem namespace.

operation

Operation.

searchtype

Search type.

output

Output format.

options

Named list of query options.

...

Additional arguments forwarded to `httr::RETRY`.

Details

Returns a typed `PubChemRecord` object and preserves transport metadata such as `success`, `status`, and cache flags.

Examples

Run this code
cmp <- pc_compound(2244, offline = TRUE)
inherits(cmp, "PubChemRecord")

if (FALSE) {
pc_compound(2244)
}

Run the code above in your browser using DataLab