This function converts an R object to xml code, so an output of an R script can be handled easly by any programming language.
Every elements in xml is encapsulated in tags. Any variable in list or variable itself is placed between and
tags. Values of elemenets are placed between and tags. Xml structure is easy to parse and browse.
Usage
makexml(obj, name = "")
Arguments
obj
R object that to be converted to xml.
name
Optinal. Each element in xml code is listed as .
Default name is name of R object, but a new name can be defined.
Value
Returns a well-formed xml file for given R object.
Details
A generated output of lm object is like this:
0.662970909075238-0.125473985248366-0.08561499076337150.963352019137748-0.212667731012814-0.561977205893819-0.133045701604119-0.4853396287132940.107354078697277-0.6244269079498041.45763471890252-0.4252686508003280.0858115975474794-1.13967406760172-0.313474791725809-0.577239374729828-0.0627629785631422-0.3295120137953310.348726585492226-0.2975095092778681.870097009451450.0727385316255820.5374969238268720.4120229385785060.286548953330140.1610749680817740.0356009828334077-0.0898730024149584-0.215346987663324-0.340820972911691-0.466294958160057-0.591768943408423018lm, y ~ x~, y, x