[R] Long command in Sweave
Duncan Murdoch
murdoch.duncan at gmail.com
Fri Apr 13 13:19:10 CEST 2012
On 12-04-13 5:46 AM, Wincent wrote:
> Dear useRs,
>
> I am writing a vignette for a package, which contains long command like this,
>> reduce(Lipset_cs,"SURVIVAL",c("GNPCAP", "URBANIZA", "LITERACY", "INDLAB", "GOVSTAB"),explain="positive",remainder="exclude",case="CASEID")
> It is longer than the width a page and part of it will become "missing".
> Currently, I have to manually break the command into multiple lines.
> Is there a better way to handle such issue?
No.
> It seems that others have raised similar question which seems to
> remain unsolved in a satisfactory fashion.
You can turn on auto-formatting, but it is a worse solution, because it
will lose all formatting from the original, including comments, white
space, etc. Use Sweave option keep.source=FALSE to do this.
Duncan Murdoch
More information about the R-help
mailing list