Learn R Programming

PubChemR (version 3.0.0)

pc_property: Query Compound Properties via the Next-Generation API

Description

Retrieves selected PubChem compound properties for one or more identifiers.

Usage

pc_property(
  identifier,
  properties,
  namespace = "cid",
  searchtype = NULL,
  options = NULL,
  ...
)

Value

A typed `PubChemRecord` object.

Arguments

identifier

Identifier(s).

properties

Character vector of property names.

namespace

PubChem namespace.

searchtype

Search type.

options

Named list of query options.

...

Additional arguments forwarded to `httr::RETRY`.

Details

`properties` is encoded into the PUG REST operation path. At least one property name is required.

Examples

Run this code
prop_rec <- pc_property(2244, properties = c("MolecularWeight"), offline = TRUE)
inherits(prop_rec, "PubChemRecord")

if (FALSE) {
pc_property(2244, properties = c("MolecularWeight", "XLogP"))
}

Run the code above in your browser using DataLab