[ESS] Formatting long character strings in R source

A.J. Rossini blindglobe at gmail.com
Tue Mar 21 21:01:01 CET 2006

We don't worry about basic questions.  This isn't R-help, and we don't
have a FAQ :-).

It's not clear what the right thing to do here is.   In particular,
should we allow >1 character of whitespace at the end of lines?  None?

test <- "If this was
my string"


test == "If this was my string"


test == "If this wasmy string"

or .... (replace the newline with any number of possible characters,
and consider if there are spaces after the "was     ").

This might be something we don't want to auto-wrap...

On 3/21/06, Robert Sams <Robert at sanctumfi.com> wrote:
> Hi,
> Apologies if this question is too basic ..I did search the archives.
> How does one format a very long character string so that it wraps inside the buffer in a sensible way when indent-region is applied?
> By default it wraps like this:
> x <- "some very long string some very long string
> long string some very long string"
> Whereas it is more readable if the beginning of all subsequent lines indented to the leftmost character of the first line.
> Thank you.
> Robert
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help


blindglobe at gmail.com
Muttenz, Switzerland.
"Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes" (AJR, 4Jan05).

More information about the ESS-help mailing list