It is verry easy with xtable package to make your own  "xtable.class"
function, if the "class" was not implemented in xtable package yet.
It would be wonderfull if odfWeave include a framework to make such things.

Ps : I would like to know if there is an R project to include all existing
format outputs (latex with Sweave, odf with odfWeave, html with rWeaveHTML)
and all the wonderful work of their author in a same package or in a same
project. All of these use a very similar syntax (<<foo>>= R code @), but
there is anyway a lot of work to rewrite the R code to make a file writes
for Sweave working with odfWeave. A latex file can be convert to latex or
rtf, but it depends on external programs not very easy to use.
For example, I would imagine an input similar to the syntax of help files
(.Rd), but the R code could be include (<< foo >>= R code @), and a
Sweave-like function could replace R code with results and convert the file
into latex, html or odf.

2008/1/16, 宋时歌 <shigesong@gmail.com>:
>
> Dear Max,
>
> If you have plan to add more table making facilities into odfWeave
> package, I suggest you base your work on Zelig, a R package that tries
> to provide a unified interface to many existing R statistical
> libraries, created by Gary King's team at Harvard. I see great
> potential in this marriage.
>
> Best,
> Shige
>
> On Jan 13, 2008 4:09 AM, Max Kuhn <mxkuhn@gmail.com> wrote:
> > One thing on my (neglected) to-do list for odfWeave is to create a
> > general class called odf that can be used to create output for common
> > models (lm, glm etc). The nice thing here is that the output from this
> > function could write mixed output. For example, a short paragraph
> > about the specified model, the table for coefficients produced by
> > summary.lm, diagnostic plots etc.
> >
> > Right now, to get the coeffcient table use:
> >
> >   #from ?lm
> >   ## Annette Dobson (1990) "An Introduction to Generalized Linear
> Models".
> >   ## Page 9: Plant Weight Data.
> >   ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
> >   trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
> >   group <- gl(2,10,20, labels=c("Ctl","Trt"))
> >   weight <- c(ctl, trt)
> >   lm.D9 <- lm(weight ~ group)
> >
> >   library(odfWeave)
> >   coefTable <- summary(lm.D9)$coef
> >   colnames(coefTable) <- odfTranslate(colnames(coefTable), toR = FALSE)
> >   odfTable(coefTable)
> >
> > Max
> >
> > On Jan 12, 2008 1:03 PM, Frank E Harrell Jr <f.harrell@vanderbilt.edu>
> wrote:
> > > ??? wrote:
> > > > Dear All,
> > > >
> > > > I am new to odfWeave and was wondering if there are something
> similar
> > > > to the xtable package that can automatically convert model
> > > > coefficients into LaTeX/ODT tables?  More generally, how do people
> who
> > > > use odfWeave transform model results into tables? The odfTable does
> > > > not seem to be able to do this (maybe I am wrong, and would
> appreciate
> > > > some demos). Thanks.
> > > >
> > > > Best,
> > > > Shige
> > >
> > > This is not related to tables, but see the latex methods in the Design
> > > package.  There are methods for using LaTeX to typeset various kinds
> of
> > > regression model fits.
> > >
> >
> > --
> >
> > Max
> >
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]

