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. It returns a list of substances corresponding to the provided identifiers.

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 get_json.

Value

A named list where each element corresponds to a substance retrieved from PubChem. The names of the list elements are based on the provided identifiers. If no substance is found for a given identifier, the corresponding list element will contain the string "No substance".


[Package PubChemR version 1.2 Index]