[R] a rounding option for \Sexpr{}?

Yihui Xie xie at yihui.name
Fri Nov 19 21:49:58 CET 2010

I will appreciate a lot if you do not mind add a new option like
'useFormat'. I suggested format() because I'm "allergic" to too many

I must say it is not hard to define the formatting, but it is just
tedious to do it for every single number because by default we have
too many digits especially for decimals.

Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

On Fri, Nov 19, 2010 at 9:55 AM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
> On 19/11/2010 10:38 AM, Dieter Menne wrote:
>> Duncan Murdoch-2 wrote:
>> >
>> >  On 19/11/2010 10:12 AM, Yihui Xie wrote:
>> >>  Maybe this should go to R-devel as a wishlist:
>> >>               val<- format(eval(parse(text=cmd), envir=.GlobalEnv))
>> >>
>> >  I don't like the current behaviour, but that change could break a lot
>> > of
>> >  existing documents.
>> >
>> Not necessarily. Add an Sweave option "useFormat=FALSE" to keep the old
>> behavior.
> I think the default would have to be FALSE, so that old documents didn't
> suddenly change.   But is it really so hard to define your own formatting?
> Duncan Murdoch
> ______________________________________________
> 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