For some ChemSpider API requests, you can also specify various control options. This function is used to set these control options.
cs_control(
datasources = vector(),
order_by = "recordId",
order_direction = "ascending",
include_all = FALSE,
complexity = "any",
isotopic = "any"
)
character; specifies the databases to query. Use
cs_datasources()
to retrieve available ChemSpider data sources.
character; specifies the sort order for the results.
Valid values are "recordId"
, "massDefect"
,
"molecularWeight"
, "referenceCount"
, "dataSourceCount"
,
"pubMedCount"
, "rscCount"
.
character; specifies the sort order for the results.
Valid values are "ascending"
, "descending"
.
logical; see details.
character; see details.
Valid values are "any"
"single"
, "multiple"
.
character; see details.
Valid values are "any"
, "labeled"
, "unlabeled"
.
Returns a list of specified control options.
The only function that currently uses databases
is
get_csid()
and only when you query a CSID from a formula. This
parameter is disregarded in all other queries.
Setting include_all
to TRUE
will consider records
which contain all of the filter criteria specified in the request. Setting
it to FALSE
will consider records which contain any of the filter
criteria.
A compound with a complexity
of "multiple"
has more
than one disconnected system in it or a metal atom or ion.
# NOT RUN {
cs_control()
cs_control(order_direction = "descending")
# }
Run the code above in your browser using DataLab