webchem.pdf

might fail if API is not available# query common namey1 <- ci_query(c('Formaldehyde','Triclosan'), type ='name')names(y1)str(y1[['Triclosan']]) # lots of information insidey1[['Triclosan']]$inchikey# Query by CASy2 <- ci_query('50-00-0', type ='rn', match ='first')y2[['50-00-0']]$inchikey# query by inchikeyy3 <- ci_query('WSFSSNUMVMOOMR-UHFFFAOYSA-N', type ='inchikey')y3[[1]]$name# extract lop-Psapply(y1, function(y){if (length(y) == 1 && is.na(y))return(NA)y$physprop$Value[y$physprop$`Physical Property`=='log P (octanol-water)']})## End(Not ru

this is the code but add
## Not run:
# continue with first line

Item URL: 
https://hypothes.is/a/XrKkugBHEeeK_29sq2H46Q