# might fail if API is not available
out <- cts_compinfo("XEFQLINVKFYRCS-UHFFFAOYSA-N")
# = Triclosan
str(out)
out[1:5]
### multiple inputs
comp <- c('Triclosan', 'Aspirin')
inchkeys <- sapply(comp, function(x) cir_query(x, 'stdinchikey', first = TRUE))
# ne to strip '#InChIKey='
inchkeys <- gsub('InChIKey=', '', inchkeys)
ll <- lapply(inchkeys, function(x) cts_compinfo(x)[1:5])
do.call(rbind, ll)Run the code above in your browser using DataLab