post_smiles: Post a SMILES string

Description Usage Arguments Details Value See Also Examples

View source: R/FILTERING-post_smiles.R

Description

Functionality to post a SMILES string to obtain a queryId for use in chemspiderapi::get_queryID_status() and chemspiderapi::get_queryId_results().

Usage

1
post_smiles(smiles, apikey, coerce = FALSE, simplify = FALSE)

Arguments

smiles

A SMILES character string.

apikey

A 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

If successful, returns the queryId as character string.

Value

Returns the queryId string as (named) character vector.

See Also

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

Examples

1
2
3
4
5
6
7
## Not run: 
## post the SMILES string of caffeine to get a queryId
smiles <- "Cn1cnc2c1c(=O)n(c(=O)n2C)C"
apikey <- "a valid 32-character ChemSpider apikey"
post_smiles(smiles = smiles, apikey = apikey)

## End(Not run)

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