[Rd] format scientific + plotmath potential bug
Philip Johnson
plfjohnson at emory.edu
Mon Jan 17 23:06:02 CET 2011
I have run into a potential bug somewhere between format (specifically
scientific notation) and plotmath that results in displaying:
$1e+01^{2e+00}$
instead of
$10^2$
Reproduce by:
plot.new()
a=format(10, scientific=TRUE)
mtext(expression(10^2), line=1) # looks like $1e+01^{2e+00}$
10 # this fixes the problem on the next line
mtext(expression(10^2), line=2) # looks like $10^2$
I can narrow the trigger somewhat further by replacing the "a=..." line
with:
a=.Internal(format(10, FALSE, NULL, 0L, NULL, 3L, TRUE, TRUE))
Tracing this call into the C started giving me a headache, so I'm hoping
that one of the R core gurus can confirm & file a bug report if necessary.
I ran into this on Ubuntu / Lucid using R version 2.10.1 (2009-12-14).
I confirmed it still exists in R 2.12.1 (2010-12-16) on a fresh install
of Ubuntu / Maverick.
Thanks,
Philip
More information about the R-devel
mailing list