On 17/01/2011 5:06 PM, Philip Johnson wrote:> 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.
Yes, I see this too in R-devel and 2.12.1. Definitely a bug, and I've
submitted it to the bug system:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14477
If you want to be kept up to date about fixes you can add yourself to
the CC list there.
Duncan Murdoch