Re: [R] Sweave and extra line

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu, 06 Mar 2008 19:31:03 -0500

On 06/03/2008 5:59 PM, Christophe Genolini wrote:
> Hi the list,
>
> I am using Sweave. Between the Sinput and the Soutput, there is always
> an extra line:
>
> > 2+2
>
> [1] 4
>
> Is it possible to remove it ?

Here's some code I worked out a while ago:

% This removes the extra spacing after code and output chunks in Sweave, % but keeps the spacing around the whole block.

\fvset{listparameters={\setlength{\topsep}{0pt}}} \renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}}

Put this somewhere in your code before the first Sweave chunk.

Duncan Murdoch

>
> > 2+2
> [1] 4
>
> Thanks
>
> Christophe
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 07 Mar 2008 - 00:38:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Mar 2008 - 01:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive