powered by
Retrieve images of substances from ChemSpider and export them in PNG format.
cs_img( csid, dir, overwrite = TRUE, apikey = NULL, verbose = getOption("verbose") )
numeric; the ChemSpider ID (CSID) of the substance. This will also be the name of the image file.
character; the download directory. dir accepts both absolute and relative paths.
dir
logical; should existing files in the directory with the same name be overwritten?
character; your API key. If NULL (default), cs_check_key() will look for it in .Renviron or .Rprofile.
cs_check_key()
logical; should a verbose output be printed on the console?
https://developer.rsc.org/docs/compounds-v1-trial/1/overview
get_csid, cs_check_key
get_csid
cs_check_key
if (FALSE) { cs_img(c(582, 682), dir = tempdir()) }
Run the code above in your browser using DataLab