From kwright at eskimo.com  Thu Jul 29 00:09:04 2004
From: kwright at eskimo.com (Kevin Wright)
Date: Thu Jul 29 00:09:13 2004
Subject: [Rd] Parsing multi-line strings.  Bug?  Feature?
Message-ID: <200407282209.PAA03103@eskimo.com>

I have an S-Plus library that I would like to port to R.  The library 
sends a mix of static and dynamic output to an html file.  For example

cat("
...
Big block of HTML formatting code
...
")
cat(dat())
cat("
More static text
")

With S-Plus I can just cut and paste HTML code from other files into my 
S-Plus script file.  This makes maintenance of the script fairly easy.

The R parser chokes on this and requires strings to have a backslash for 
line continuation:

f = function(){
 sometext = " abc \
def"
}

Mark Bravington discussed the same issue (with comments about
the documentation) here:
http://tolstoy.newcastle.edu.au/R/help/02b/5199.html

I would like to echo Mark's request that compatability with S-Plus 
be considered.

Thanks

Kevin Wright


[Rd] Parsing multi-line strings. Bug? Feature?
Kevin Wright