# NOT RUN {
# might fail if API is not available
# return all hits
pan_query('2,4-dichlorophenol')[[1]][c(1, 2, 5, 74)]
# return only first hit
pan_query('2,4-dichlorophenol', match = 'first')[[1]][c(1, 2, 5, 74)]
# return only best hit
pan_query('2,4-dichlorophenol', match = 'best')[[1]][c(1, 2, 5, 74)]
out <- pan_query(c('Glyphosate', 'Rotenone'), from = "name", match = 'best')
out
# extract Acute Toxicity Summary
# sapply(out, function(y) y$`Acute Toxicity Summary`)
# }
Run the code above in your browser using DataLab