post_inchikey: Post an InChIKey as ChemSpider query

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/FILTERING-post_inchikey.R

Description

Functionality to post an InChIKey to obtain a queryId for use in chemspiderapi::get_status() and chemspiderapi::get_results().

Usage

1
post_inchikey(inchikey, apikey, coerce = FALSE, simplify = FALSE)

Arguments

inchikey

A valid 27-character InChIKey; see Details.

apikey

A valid 32-character string with a valid key for ChemSpider's API services.

coerce

logical: should the list be coerced to a data.frame? Defaults to FALSE.

simplify

logical: should the results be simplified to a vector? Defaults to FALSE.

Details

The validity criteria for InChIKeys are outlined here: https://www.inchi-trust.org/technical-faq/#13.1. If certain criteria are not met by the input inchikey, chemspideR::post_inchikey() returns an error message (and does not perform an API query). In the case of a non-standard inchikey, a warning is issued but the query will be performed.

Value

Returns the queryId string as (named) character vector.

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

See Also

https://developer.rsc.org/compounds-v1/apis/post/filter/inchikey

Examples

1
2
3
4
5
6
7
## Not run: 
## Post the InChIKey of caffeine to obtain a queryId
inchikey <- "RYYVLZVUVIJVGH-UHFFFAOYSA-N"
apikey <- "A valid 32-character Chemspider API key"
post_inchikey(inchikey = inchikey, apikey = apikey)

## End(Not run)

NIVANorge/chemspiderapi documentation built on Jan. 10, 2021, 10:12 a.m.