[R] how to type long string

Duncan Murdoch dmurdoch at pair.com
Sat Jul 14 21:48:06 CEST 2001


On Sat, 14 Jul 2001 11:08:48 -0700 (PDT), you wrote:

>Hi, All:
>
>I try to type some long string in R console, whenever
>I like to change to a new line, I get error message.

There are two ways.  End each line with a backslash, i.e.

  s <- 'Start of long string\
second line of long string'

This puts a \n in the string.  I don't know if there's a way to avoid
that on input, but you case use paste:

 s <- paste('Start of long string',
'second part of long string')

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list