View source: R/xml.Extract.NM.Value.r
xml.Extract.NM.Value | R Documentation |
Extract XML content into a numeric vector
xml.Extract.NM.Value(x, what = "theta")
x |
The 'theta' element from NONMEM output in XML format |
what |
character string, like 'theta' or 'thetase' |
Numeric vector
nm.extract.xml
## Not run:
library(XML)
run = "example1"
filename = "C:/nm73g64/examples/example1.xml"
top = xmlRoot(xmlTreeParse(filename))# names(top)
TMP = top[["nonmem"]][["problem"]]
TMP = TMP[grepl("estimation", names(TMP))]
len = length(TMP)
## get estimation titles
est.methods = sapply(1:length(TMP), function(x,TMP)
xmlValue(TMP[x][["estimation"]][["estimation_title"]]), TMP = TMP)
names(TMP) = est.methods
tmp = TMP[[1]]
xml.Extract.NM.Value(asXMLNode(tmp[["theta"]]), what = "theta")
xml.Extract.NM.Value(asXMLNode(tmp[["thetase"]]), what = "theta")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.