[R] Creating XML using apply
arunkumar1111
akpbond007 at gmail.com
Fri Feb 17 07:12:52 CET 2012
Hi
My data looks like this
data is a vector
data= var1 var2 var3
100 120 130
i want to put it in an XML
xmlOutput=NULL
xmlOutput<- newXMLNode("results")
for( i in 1 : length(data))
{
newXMLNode("variable",attrs=c(name =names(data)[i] ), value =
data[i]), parent = xmlOutput)
}
is it possible to use apply here
If there more variables it takes long time to create XML
-----
Thanks in Advance
Arun
--
View this message in context: http://r.789695.n4.nabble.com/Creating-XML-using-apply-tp4396480p4396480.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list