[R] problem with latex of object summary reverse

Philippe Glaziou glaziou at pasteur-kh.org
Sat Jun 14 04:33:47 CEST 2003


Frank E Harrell Jr <fharrell at virginia.edu> wrote:
> I tried this on the latest version of Hmisc (1.6-0):
> 
> library(Hmisc)
> set.seed(1)
> y <- factor(sample(c('a','b','c'),100,T))
> x <- runif(100)
> a <- summary(y ~ x, method='reverse')
> options(digits=3)
> latex(a)
> 
> and everything was fine.   The following also worked:
> 
> data(iris)
> a <- summary(Species~Sepal.Length, method='reverse',data=iris)
> latex(a)
> 
> See if a bug fix in Hmisc has fixed your problem since the
> last time you updated the package.


Sorry to bother you again, I use the latex command with
Sweave, and I would like to see the reports come out well
without manual interventions on some tex files. 

My Hmisc package version is also 1.6-0, and your first
example gives me the same problem: the first N on the second
row goes into the first column instead of the second one,
all the other Ns are one column to the left of the column
where they should appear, although the summary command
prints ok within R. Also, \multicolumn{} inherits the
position parameter {l} of the remaining of the first 
column, rather than for instance {c} if it where on the
second column.  The remaining of the latex table is right.

Are there any unix tools or latex styles called by your
programmes, that I should check on my system?

Below is the latex compilation output that appears after 
the command latex(a) of your first example. 



  This is TeX, Version 3.14159 (Web2C 7.3.7)
  (/tmp/Rtmp1996/file66334873.tex LaTeX2e <2001/06/01> Babel
  <v3.7h> and hyphenation patterns for american, french,
  german, ngerman, n ohyphenation, loaded.
  (/usr/share/texmf/tex/latex/base/report.cls Document Class:
  report 2001/04/21 v1.4e Standard LaTeX document class
  (/usr/share/texmf/tex/latex/base/size10.clo))
  (/usr/share/texmf/tex/latex/misc/geometry.sty
  (/usr/share/texmf/tex/latex/graphics/keyval.sty)
  (/usr/share/texmf/tex/latex/config/geometry.cfg)) No file
  file66334873.aux.
  
  Underfull \hbox (badness 10000) in paragraph at lines 19--20
  
  [1] (./file66334873.aux)
  
  LaTeX Warning: Label(s) may have changed. Rerun to get
  cross-references right.
  
   )
  (see the transcript file for additional information)
  Output written on file66334873.dvi (1 page, 760 bytes).
  Transcript written on file66334873.log.



Thanks for your help,

-- 
Philippe




More information about the R-help mailing list