Re: [R] Long command in Sweave

2012-04-13 Thread Gavin Simpson
I use Emacs and ESS, with the coding standards in one of the R manuals. I have to insert the carriage returns where I want them, but Emacs/ESS indents the code correctly G On Fri, 2012-04-13 at 22:17 +0800, Wincent wrote: > Thanks, Gavin and Duncan. > > In that case, what I need is a suitable ed

Re: [R] Long command in Sweave

2012-04-13 Thread Yihui Xie
You can probably try knitr; see the manual for example: https://github.com/downloads/yihui/knitr/knitr-manual.pdf Code reformatting is based on the formatR package (https://github.com/yihui/formatR/wiki), which tries to preserve your comments while breaking your long lines into shorter ones. Howe

Re: [R] Long command in Sweave

2012-04-13 Thread Wincent
Thanks, Gavin and Duncan. In that case, what I need is a suitable editor which can break the command properly. All the best On 13 April 2012 19:33, Gavin Simpson wrote: > On Fri, 2012-04-13 at 17:46 +0800, Wincent wrote: >> Dear useRs, >> >> I am writing a vignette for a package, which contains

Re: [R] Long command in Sweave

2012-04-13 Thread Gavin Simpson
On Fri, 2012-04-13 at 17:46 +0800, 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

Re: [R] Long command in Sweave

2012-04-13 Thread Duncan Murdoch
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