[R] problem with latex of object summary reverse

Frank E Harrell Jr fharrell at virginia.edu
Sat Jun 14 23:11:47 CEST 2003


On Sat, 14 Jun 2003 09:33:47 +0700
Philippe Glaziou <glaziou at pasteur-kh.org> wrote:

> 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. 

latex(object, file='') works with Sweave's <<results=tex>>= construct.

> 
> 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.

As in my previous note I could not duplicate that on Linux using the standard tetex distribution of latex etc.  Please send output from the version command (I need to at least see the OS you are using) and your complete script (which you did not send before) so that I can run it exactly as you do, if you still cannot get it to work.

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

None for that application.

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

That's more confusing than ever, because I see a successful run in the log messages below.  There were no errors, only a warning.  This warning is expected.

Frank

> 
> 
> 
>   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
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help


---
Frank E Harrell Jr              Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat




More information about the R-help mailing list