request {PubChemR}R Documentation

Request Function for PubChem API

Description

Constructs a URL for the PubChem API based on the provided parameters.

Usage

request(
  identifier = NULL,
  namespace = "cid",
  domain = "compound",
  operation = NULL,
  output = "JSON",
  searchtype = NULL,
  options = NULL
)

Arguments

identifier

The identifier for the compound.

namespace

The namespace for the identifier (default: 'cid').

domain

The domain for the request (default: 'compound').

operation

The operation to be performed (default: NULL).

output

The desired output format (default: 'JSON').

searchtype

The type of search to be performed (default: NULL).

options

Additional parameters. Currently has no effect on the results.

Value

A constructed URL for the PubChem API.

Examples

request(
  identifier = "aspirin",
  namespace = "name"
)

[Package PubChemR version 1.2 Index]