Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/FILTERING-post_formula_batch.R
Functionality to post a batch of up to 100 formulas to obtain a queryId
for use in chemspiderapi::get_formula_batch_queryId_status()
and chemspiderapi::get_formula_batch_queryId_results()
.
1 2 3 4 5 6 7 8 | post_formula_batch(
formulas,
dataSources = NULL,
orderBy = "recordId",
orderDirection = "ascending",
apikey,
coerce = FALSE
)
|
formulas |
A character vector of up to 100 chemical formulas. |
dataSources |
Optional: Either a single character string or a vector of character string specifying the data sources. A list of possible data sources can be obtained from |
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 |
|
Possible values for orderBy
are: "recordId"
(default), "massDefect"
, "molecularWeight"
, "referenceCount"
, "dataSourceCount"
, "pubmedCount"
, and "rscCount"
.
Possible values for orderDirection
are: "ascending"
(default) and "descending"
.
"If dataSources is not specified, all known sources are searched. This will take longer."
Returns the queryId string as (named) character vector.
Raoul Wolf (https://github.com/RaoulWolf/)
https://developer.rsc.org/compounds-v1/apis/post/filter/formula/batch
1 2 3 4 5 6 7 | ## Not run:
## Post the formulas of caffeine and cocaine to get a query ID
formulas <- c("C9H8O4", "C17H21NO4")
apikey <- "a valid 32-character ChemSpider apikey"
post_formula_batch(formulas = formulas, apikey = apikey)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.