post_name: Post a name to obtain a ChemSpider query ID

Description Usage Arguments Details Value See Also Examples

View source: R/FILTERING-post_name.R

Description

Functionality to POST the name of a compound and obtain a ChemSpider query ID for subsequent use in chemspiderapi::get_queryId_status() and chemspiderapi::get_queryId_results().

Usage

1
2
3
4
5
6
7
8
post_name(
  name,
  orderBy = "recordId",
  orderDirection = "ascending",
  apikey,
  coerce = FALSE,
  simplify = FALSE
)

Arguments

name

A character string of the compound name.

orderBy

A character string indicating by which parameter the results should be arranged (NOT case sensitive); see Details.

orderDirection

A character string indicating which in which direction the results should be arranged (NOT case sensitive); see Details.

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

Allowed entries for orderBy are: "recordId" (default), "massDefect", "molecularWeight", "referenceCount", "dataSourceCount", "pubMedCount", and "rscCount".

Allowed entries for orderDirection are: "ascending" (default) and "descending".

Value

Returns the queryId string as (named) character vector.

See Also

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

Examples

1
2
3
4
5
6
7
## Not run: 
## Post the name of caffeine to obtain a query ID
name <- "caffeine"
apikey <- "a valid 32-character ChemSpider apikey"
post_name(name = name, apikey = apikey)

## End(Not run)

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