[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:

>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<- 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:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list