Skip to content
Prev 77196 / 398503 Next

Long lines with Sweave

On Wed, Sep 14, 2005 at 02:49:56PM +0200, Henrik Andersson wrote:
Ok, I see.

It seems to me that you could omit the curly braces in the example, I
don't see any differences between the title in the plots produced by

    plot(1:10, main = expression(DIC~(mmol~m^-3)))

and

    plot(1:10, main = expression(DIC~(mmol~m^{-3})))

For more complex exponents, you could try plain() to prevent them from
being wrongly grouped by operator precedence, as in

    plot(1:10, main = expression(DIC~(mmol~m^plain(-3 + t))))

Not exactly ideal for readability, however...

Best regards, Jan