Learn R Programming

optiRum (version 0.41.1)

convertToXML: Produce an XML document of a table

Description

Produce a document containing all data.table or data.frame rows

Usage

convertToXML(data, name = "doc")

Arguments

data

The data to be converted

name

The toplevel node name

Value

xml An XML object

Details

Code was taken from https://stat.ethz.ch/pipermail/r-help/2010-February/228025.html and amended, basic tests applied

See Also

Other helper: CJ.dt(), generatePDF(), pounds_format(), sanitise(), thousands_format(), wordwrap()

Examples

Run this code
# NOT RUN {
df<-data.frame(nper=c(12,24),pmt=c(-10,-10),pv=c(110,220))
xml<-convertToXML(df,name='examples')

# }

Run the code above in your browser using DataLab