The following code library(Hmisc) x = 1:10 y = x latex(summary(x~y),table.env=FALSE) latex(summary(cbind(x,y)),table.env=FALSE) should produce latex output that is not a table. The second one produces just a tabular, as it should. However, the first one produces a tabular embedded in a table. (This is the effect if you leave table.env=FALSE out).
steve wrote:> The following code > > library(Hmisc) > x = 1:10 > y = x > latex(summary(x~y),table.env=FALSE) > latex(summary(cbind(x,y)),table.env=FALSE) > > should produce latex output that is not a table. The second one > produces just a tabular, as it should. However, the first one produces a > tabular embedded in a table. (This is the effect if you leave > table.env=FALSE out).summary(x~y) produces a summary.formula.response object and latex.summary.formula.response generates a caption for the table. Whenever latex.default sees a caption it sets table.env to TRUE. You might try the ctable option if you have the ctable style installed in LaTeX or we can think about respecting table.env more fully. But I wouldn't know what to do with the caption then. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Possibly Parallel Threads
- Latex problem in Hmisc (3.8-1) and Mac Os X with R 2.11.1
- Hmisc latex: table column width
- summary in Hmisc and Latex
- Hmisc Latex Question: column headings and Major Column Headings not properly alligned
- Package Hmisc, functions summary.formula() and latex(), options pdig, pctdig, eps and prmsd