![]() "Caryophylladienol I" "Caryophylla-3(15),7(14)-dien-6-ol" "«alpha»-Caryophylladienol" stereo <- xpathSApply(doc, "//li/strong/./ul/li/a", xmlValue) There are other ways to grab the values in unordered lists, for example, to get all stereoisomers as a vector. Then count rows to find the correct table and get values sapply(y, nrow) Use readHTMLTable for tables y <-readHTMLTable(doc, stringsAsFactors=FALSE) X <- gsub("Download the identifier in a file.", "", x) If you are only writing to a file, then you could fix the delimited list in element 8 (replace newlines with semicolon) and remove the remaining newlines. "Options:\nSwitch to calorie-based units\n\n" "Information on this page:\nGas Chromatography\nReferences\nNotes / Error Report\n\n" "Stereoisomers:\nCaryophylladienol I\nCaryophylla-3(15),7(14)-dien-6-ol\n«alpha»-Caryophylladienol\nExo methylene. "Species with the same structure:\nCaryophylla-4(14), 8(15)-dien-5-ol\n\n" ![]() "Chemical structure: \nThis structure is also available as a 2d Mol file\n "IUPAC Standard InChIKey:\nCIIYOYPOMGIECX-JXQTWKCFSA-N" Grab all lists with a bold title (some output truncated for display) x <- xpathSApply(doc, "//li/strong/.", xmlValue) If anyone would have the skill to port that code to R please let me know!įor the first URL string in your question, try casno = "1" ![]() Would anyone with a bit more experience with that function be able to help me out a bit by any chance?Įdit: I have figured out a solution to import the data in Mathematica, see. But no need to have it so polished - anything to get me started would help really!Įdit: I have been trying to parse the html file using htmlTreeParse in package XML, but I am not quite succeeding. > list of measured RIs plus on which column they were measuredĮ.g. > stereoisomers=XXX (list of stereoisomers) > InChiKey="CIIYOYPOMGIECX-JXQTWKCFSA-N" If (molfile3d=character(0)) molfile3d=NAįrom the following bits of the raw output I would then like to extract the following variables
0 Comments
Leave a Reply. |