Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/FILTERING-post_element.R
Functionality to post up to 15 elements to include and up to 100 elements to exclude to obtain a queryId
for use in chemspiderapi::get_queryId_status()
and chemspiderapi::get_queryId_results()
.
1 2 3 4 5 6 7 8 9 10 11 12 | post_element(
includeElements,
excludeElements,
includeAll = FALSE,
complexity = "any",
isotopic = "any",
orderBy = "recordId",
orderDirection = "ascending",
apikey,
coerce = FALSE,
simplify = FALSE
)
|
includeElements |
A character vector of elements to include; maximum length 15. |
excludeElements |
A character vector of elements to exclude; maximum length 100. |
includeAll |
|
complexity |
See Details. |
isotopic |
See Details. |
orderBy |
A character vector indicating by which parameter to order. Defaults to |
orderDirection |
A character vector indicating in which direction to order; either |
apikey |
A 32-character string with a valid key for ChemSpider's API services. |
coerce |
|
simplify |
|
Says ChemSpider:
"Optionally, you can also submit orderBy
and orderDirection
to specify the sort order for the results. If you do not specify a value for orderBy
, results are sorted by [recordId
] by default."
Valid values for orderBy
are recordId
, massDefect
, molecularWeight
, referenceCount
, dataSourceCount
, pubMedCount
, rscCount
.
Valid values for orderDirection
are ascending
, descending
.
The default behavior is to consider records which contain any of the elements listed in includeElements
. Setting includeAll
to TRUE
will only consider records which contain all the elements listed in the includeElements
.
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"
."
Returns the queryId string as (named) character vector.
Raoul Wolf (https://github.com/RaoulWolf/)
https://developer.rsc.org/compounds-v1/apis/post/filter/element
1 2 3 4 5 6 7 8 | ## Not run:
## Post the elements for caffeine and exclude certain elements
includeElements <- c("C", "H", "N", "O")
excludeElements <- c("K", "Na", "Fe", "Cl", "F")
apikey <- "a valid 32-character ChemSpider apikey"
post_element(includeElements = includeElements, excludeElements = excludeElements, apikey = apikey)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.