Retrieve ChemSpider ID

Description

Return Chemspider ID (CSID) for a search query, see https://www.chemspider.com/.

Usage

1
get_csid(query, token = NULL, first = TRUE, verbose = TRUE, ...)

Arguments

query

charachter; search term.

token

character; your security token.

first

logical; If TRUE (default) return only first result.

verbose

logical; should a verbose output be printed on the console?

...

currently not used.

Value

if first = TRUE a character vector with ChemSpider IDs, otherwise a list.

Note

A security token is neeeded. Please register at RSC. https://www.rsc.org/rsc-id/register for a security token. Please respect the Terms & conditions https://www.rsc.org/help-legal/legal/terms-conditions/.

Author(s)

Eduard Szoecs, eduardszoecs@gmail.com

See Also

cs_compinfo and cs_extcompinfo to retrieve compound details from csid.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Fails because no TOKEN is included
token <- '<YOUR-SECURITY-TOKEN>'
get_csid("Triclosan", token = token)[[1]]
# [1] "5363"
get_csid(c("Triclosan", "50-00-0"), token = token)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.