[R] Forcing standard notation in Sweave tables

Bryan Hanson hanson at depauw.edu
Tue Dec 14 02:05:54 CET 2010


Take a look at package xtable.

Bryan


On 12/13/10 7:31 PM, "Chris Fonnesbeck" <fonnesbeck at gmail.com> wrote:

> I'm hoping someone with some experience generating tables in Sweave will be
> able to solve this problem for me. I'm experiencing some inconsistency with
> the way floating point numbers are displayed -- for some tables, they will be
> in standard notation, e.g.
> 
> 
> 11±26
> 
> 
> while in others, it uses exponential notation, e.g.
> 
> 
> 1.1e+01±2.6e+01
> 
> 
> 
> I am using code such as the following; note I have specified "digits=2". There
> does not appear to be an argument for notation.
> 
> 
> latex(tabletwo,
> file='',
> where='!h',
> digits=2,
> prmsd=TRUE,
> caption='Time to events',
> exclude1=FALSE,
> long=TRUE)
> 
> 
> 
> This has been driving me insane for a couple hours now, so I'm hoping there is
> an easy answer.
> 
> 
> Thanks in advance,
> cf
> 
> [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list