get_datasources: Get external ChemSpider data sources

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

View source: R/LOOKUPS-get_datasources.R

Description

Returns all external ChemSpider data sources.

Usage

1
get_datasources(apikey, coerce = FALSE, simplify = FALSE)

Arguments

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

"Many other endpoints let you restrict which sources are used to lookup the requested query. Restricting the sources makes queries faster."

Returns all available external ChemSpider data sources.

This function is most useful for narrowing down dataSources in other chemspiderapi functions, for example get_recordId_externalreferences().

Value

Either a list, data.frame, or vector of characters.

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

See Also

https://developer.rsc.org/compounds-v1/apis/get/lookups/datasources

Examples

1
2
3
4
5
6
## Not run: 
## Get external data sources of ChemSpider
apikey <- "A valid 32-character Chemspider API key"
get_datasources(apikey = apikey)

## End(Not run)

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