# might fail if API is not available
get_pcid('Triclosan')
# multiple inputs
comp <- c('Triclosan', 'Aspirin')
sapply(comp, function(x) get_pcid(x))
sapply(comp, function(x) get_pcid(x, first = TRUE))
Run the code above in your browser using DataLab