[R] [survey] R for Reporting - the R Output MAnager (ROMA) project

A.J. Rossini blindglobe at gmail.com
Wed Jan 12 14:46:41 CET 2005


Your example is sequential, ignoring the tree-like structure of most
documents. Why not via a DOM or similar "XML-ish" structure?

While I'd never advocate general purpose XML as a user format, as you
note, that is what XSLT is for, and using XML as an electronic
internal document representation would provide a potentially more
scalable system.

(i.e. use XML and the DOM internally, but provide a simple API to it).

The other advantage would be that you could stick a dependency DAG
(ADG) via a second set of marked edges of the document "graph/tree" to
allow for selective regeneration of results.

But then, this project isn't on my to-do list this year :-).

best,
-tony



On Wed, 12 Jan 2005 14:16:57 +0100, Eric Lecoutre
<lecoutre at stat.ucl.ac.be> wrote:
> 
> Hi R UseRs,
> 
> I am interested in providing Reporting abilities to R and have initiated a
> project called R Output MAnager (ROMA).
> My starting point was my R2HTML package which provides (rough) HTML
> exportations. I began with trying to mimic it for LaTeX but fastly did
> realize that it was a bad idea.
> Thus, I started again from scratch a new package and did spend a lot of
> time reading about this topic, looking at what other software do (SAS ODS,
> SPlus SPXML,...) and studying technologies and formats: XML+XLST, LyX,
> DocBook, RTF,...
> 
> What follows is a description of my plans. This email is targetted to
> interested useRs, in order to have a return on that.
> It comes with a little survey at the end that will be useful to me to
> target my package.
> If you are also interested in Reporting (Output, Formats, Exchange,...),
> please read the following and answer the survey.
> If not, you can skip this message - apologies for sending it to R-help, I
> hope you don't mind.
> 
> ---
> 
> As a matter of fact, I have implemented something that shows promises
> (according to me). Currently, from the following output description:
> 
> ***
>  data(iris)
>  mm=as.matrix(iris[1:5,1:4])
> 
>  out = emptyContent()
>  out = out + Section("A title here")
>  out = out + diag(2)
>  out = out + Comment("comment: yes!")
>  out = out + list(un=1,pi)
>  out = out + "Then a boolean:" + TRUE
>  out = out + Section("Default matrix",level=2)
>  out = out + mm
>  out = out + Section("Custom matrix" + Footnote("It works!"),level=2)
>  out = out +
> ROMA(mm,style="custommatrix",rowstyle=paste("color",row(mm)[,1]%%2,sep=""),align="left")
>  out = out + Section("An other title")
>  out = out + ROMAgenerated()    # ROMAgenerated is a predefined function
> ***
> 
> You can generate a proper HTML file by the following command:
> 
> > Export(out)
> 
> (see result: http://www.stat.ucl.ac.be/ROMA/sample.htm)
> 
> The same "output object" could be exported to (tex+dvi+ps+pdf) with:
> 
> >  Export(out,driver="latex")
> 
> (see result: http://www.stat.ucl.ac.be/ROMA/sample.pdf / Change extension
> for other formats: tex and ps)
> 
> --- Survey ---
> 
> IMPORTANT: ONLY DO REPLY TO ME, NOT TO R-HELP MAILING LIST
> 
> Simply fill in the questions you want to asnwer to:
> 
> 1. I am interesting in Reporting abilities for R
>     [ ] Definitively
>     [ ] Rather Yes
>     [ ] Rather No
>     [ ] Not at all
> 
> 2. I have some knowledge about those different formats / specifications
>     [ ] rtf      [ ] LaTeX  [ ] LyX
>     [ ] html     [ ] css    [ ] xHTML
>     [ ] XML      [ ] XLST   [ ] DocBook
> 
> 3. I have some knowledge about those tools
>     [ ] SAS ODS
>     [ ] SPlus SPXML library
>     [ ] XLST + XLST-FO chain
> 
> 4. I would be specially interested in the following formats (multiple
> choices possible)
>     [ ] rtf
>     [ ] tex
>     [ ] lyx
>     [ ] XML, with a DTD specific to R
>     [ ] XML, with the DTD from SPlus (compatible with SPXML library)
>     [ ] XML, DocBook flavor
>     [ ] HTML + css (good xHTML)
>     [ ] Word (doc)
>     [ ] OpenOffice (oo)
>     [ ] Plain text
>     [ ] Other:
> 
> 4bis: If several formats, the best (according to me and my needs) one would
> be: ____
> 
> 5. The approach is to fully separate content from formating. So, XML would
> be an ideal output format. Nevertheless, few people who use R may also
> mater XLST to produce nice formatted output. Thus, a way to handle styles
> (bold, colors, fonts, etc.) from R would also be great. It may not be a
> priority. Statistical output do have some specific issues: mathematics,
> complicated tables, graphs, and so on. For each of the following items,
> please tell me how important the issue is for you:
> 
>        0: I don't need that (and think I will never need it)
>        1: Not really important
>        ...
>        5: Crucial - I can't leave without that point anymore
> 
>  5.1 - Beeing able to read the document in any OS:
>  Importance: __
> 
>  5.2 - Having an object that describes the output within R (as in the
> example), so that I could add/remove things, reexport it
>  Importance: __
> 
>  5.3 - Beeing able to define basics formatting also within R (bold,
> colors, fonts, and so on)
>  Importance: __
> 
>  5.4 - Beeing able to include mathematics, as (La)TeX codes or MathML
>  Importance: __
> 
>  5.5 - Beeing able to build complicated tables, with merged cells,
> embedding lists, eventually sub-tables
>  Importance: __
> 
> 6. Here are some conceptual objects that a report may contain. Are there
> any more you can think to which may be important?
>        Tables (containing Rows and Cells), Lists, Titles, Footnotes, Comment,
> Abbreviations / Acronyms, Code, Links, Graphs, Layout  (to have 2 or 3
> columns), Mathematics (equations), Table of Contents, Index
> 
>        Other that could be added:
> 
> 7. Two different tools allow to create "dynamic" or alike documents: Sweave
> (for LaTeX and HTML) and Rpad (HTML, with a server). I would be interested
> in beeing able to describe the structure of a document that would be
> exportable to:
> 
>  7.1 -  Sweave   [ ] Yes    [ ] No
>  7.2 -  Rpad     [ ] Yes    [ ] No
> 
> If you are interested in contributing to the project, please let me know
> also. If many people do need XML representations, I think it would be great
> to have a guru in XLST abilities in the development team.
> 
> Thanks for attention,
> 
> Happy R,
> 
> Eric
> 
> Eric Lecoutre
> UCL /  Institut de Statistique
> Voie du Roman Pays, 20
> 1348 Louvain-la-Neuve
> Belgium
> 
> tel: (+32)(0)10473050
> lecoutre at stat.ucl.ac.be
> http://www.stat.ucl.ac.be/ISpersonnel/lecoutre
> 
> If the statistics are boring, then you've got the wrong numbers. -Edward
> Tufte
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 


-- 
best,
-tony

"Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes" (AJR, 4Jan05).

A.J. Rossini
blindglobe at gmail.com




More information about the R-help mailing list