[R] Long lines with Sweave

Henrik Andersson h.andersson at nioo.knaw.nl
Wed Sep 14 10:14:59 CEST 2005


I have used Sweave a lot the latest year, but never really used any long 
function calls.


If I have code which look like this

-------------------------------------------------------------
gof <- benthic.flux(ID="Gulf of Finland",
                     meas.conc=conc,
                     bw.conc=bw.conc,
                     time=times,
                     substance=expression(DIC~(mmol~m^{-3}))
                     )
-------------------------------------------------------------

I get the output by Sweave in my pdf file, like this:

---------------------------------------------------------------
 > gof <- benthic.flux(ID = "Gulf of Finland", meas.conc = conc,
+ bw.conc = bw.conc, time = times, substance = expression(DIC ~
+ (mmol ~ m^{
+ -3
+ })))
----------------------------------------------------------------

I can understand that it will not look exactly as entered but why is the 
'-3' on a line of it's own?

Can anyone suggest a idea to how I can make this more readable.

---------------------------------------------
Henrik Andersson
Netherlands Institute of Ecology -
Centre for Estuarine and Marine Ecology
P.O. Box 140
4400 AC Yerseke
Phone: +31 113 577473
h.andersson at nioo.knaw.nl
http://www.nioo.knaw.nl/ppages/handersson




More information about the R-help mailing list