Ken Knoblauch
2006-Mar-10 12:21 UTC
[R] R] Sweave scientific real display format (e.g. 5e-12)
How about some variation on the following:
x <- 5e-12
xc <- as.character(x)
xss<-strsplit(xc, "")
paste("$",xss[1],"\cdot ^{",xss[3],xss[4],
xss[5],"}$", sep = "")
[1] "$5cdot ^{-12}$"
untried, of course, but maybe you could squeeze something out of it.
*********************************
Dear All,
I couldn't figure and couldn't google out how to make construct a pair
of
\Sexpr s or a LaTeX macro that would include
5\cdot 10^{-12}
into the LaTeX output istead of
5e-12 .
Any ideas?
Thank you
G?bor
--
Ken Knoblauch
Inserm U371
Cerveau et Vision
Dept. of Cognitive Neuroscience
18 avenue du Doyen L?pine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.lyon.inserm.fr/371/