[R] globally set digits=3 in Sweave

Liviu Andronic landronimirc at gmail.com
Thu Aug 20 12:19:20 CEST 2009


Dear all
I would like to globally set
options(digits = 4)

in an Sweave document. I've read this thread [1] where it was
suggested to set the above option and pass every printed number
through format(). Aanother way to do so would be to round(expr, 4).
However I would like to set the digits option once per document so
that every number printed respects it, without the need to pass every
time through a formatting/rounding function. Is this possible in
Sweave?

Thank you
Liviu
[1] https://stat.ethz.ch/pipermail/r-help/2003-September/039481.html





-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail




More information about the R-help mailing list