get_substances {PubChemR}R Documentation

Retrieve Substances from PubChem

Description

This function sends a request to PubChem to retrieve substance data based on the specified parameters.

Usage

get_substances(
  identifier,
  namespace = "sid",
  operation = NULL,
  searchtype = NULL,
  options = NULL
)

Arguments

identifier

A character or numeric vector specifying the identifiers for the request.

namespace

A character string specifying the namespace for the request. Default is 'sid'.

operation

Specifies the operation to be performed on the input records. For the 'compound' domain, possible operations include 'record', 'property', 'synonyms', 'sids', 'cids', 'aids', 'assaysummary', 'classification', 'xrefs', and 'description'. The available operations are domain-specific.

searchtype

Specifies the type of search to be performed. For structure searches, possible values are combinations of 'substructure', 'superstructure', 'similarity', 'identity' with 'smiles', 'inchi', 'sdf', 'cid'. For fast searches, possible values are combinations of 'fastidentity', 'fastsimilarity_2d', 'fastsimilarity_3d', 'fastsubstructure', 'fastsuperstructure' with 'smiles', 'smarts', 'inchi', 'sdf', 'cid', or 'fastformula'.

options

Additional parameters passed to PubChem request.

Value

An object of class 'PubChemInstanceList' containing all the substance information of requested compounds.

Examples


subs <- get_substances(
  identifier = c("aspirin", "ibuprofen"),
  namespace = "name"
)

instance(subs, "aspirin")
retrieve(instance(subs, "aspirin"), "source")



[Package PubChemR version 2.0 Index]