View source: R/xml.Extract.NM.Matrix.r
xml.Extract.NM.Matrix | R Documentation |
Extract XML content into a Numeric Matrix
xml.Extract.NM.Matrix(y)
y |
XML children |
A matrix
nm.extract.xml
, make.symmetric
## 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")
names(tmp)
omega = lapply(asXMLNode(tmp[["omega"]])$children, xml.Extract.NM.Matrix)
make.symmetric(unlist(omega))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.