post_intrinsicproperty: Post an intrinsic property

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

View source: R/FILTERING-post_intrinsicproperty.R

Description

Functionality to post an intrinsic property to obtain a queryId for use in chemspiderapi::get_queryId_status() and chemspiderapi::get_queryId_results().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
post_intrinsicproperty(
  property,
  formula = NULL,
  complexity = "any",
  isotopic = "any",
  mass = NULL,
  range = NULL,
  orderBy = "recordId",
  orderDirection = "ascending",
  apikey,
  coerce = FALSE,
  simplify = FALSE
)

Arguments

property

See Details.

formula

See Details.

complexity

See Details.

isotopic

See Details.

mass

See Details.

range

See Details.

orderBy

A character string indicating by which parameter the results should be ordered; see Details.

orderDirection

A character string indicating in which direction the results should be ordered; 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

Valid entries for property are: formula, molecularWeight, nominalMass, averageMass, or monoisotopicMass.

Says ChemSpider:

"Valid values for complexity are any, single, or multiple whereby a compound with a complexity of multiple has more than one disconnected system in it or a metal atom or ion.

Valid values for isotopic are any, labeled, or unlabeled.

You can use orderBy and orderDirection to specify the sort order for the results. Valid values for orderBy are recordId, massDefect, molecularWeight, referenceCount, dataSourceCount, pubMedCount, rscCount.

Valid values for orderDirection are ascending, descending."


If successful, returns the queryId as character vector.

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/intrinsicproperty

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
## Post an intrinsic property for caffeine to get a query ID
property = "Formula"
formula = "C8H10N4O2"
apikey <- "a valid 32-character ChemSpider apikey"
post_intrinsicproperty(property = property, formula = formula, apikey = apikey)

property <- "MolecularWeight"
mass <- 194
range <- 0.5
apikey <- "a valid 32-character ChemSpider apikey"
post_intrinsicproperty(property = property, mass = mass, range = range, apikey = apikey)

## End(Not run)

NIVANorge/chemspideR documentation built on Jan. 8, 2021, 7:48 a.m.