[R] Creating XML using apply

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Fri Feb 17 09:10:35 CET 2012


Undoubtedly. However, it probably won't affect the time it takes to finish by very much.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

arunkumar1111 <akpbond007 at gmail.com> wrote:

>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.
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list