[R] Difference in lexical analysis of strings in R and S-PLUS?

David O. Nelson daven at llnl.gov
Tue Dec 11 00:04:14 CET 2001


It appears that R (1.3.1, Solaris and Windows) tokenizes strings differently
than S-PLUS (6 on Solaris and Windows).

S-PLUS:

> foo <- "abc
Continue string: def"
> cat(foo)
abc
def>

R:


> foo <- "abc
Error: syntax error
>

This difference occurs in source'd files as well. Is there a way to get the
S-PLUS's (and perl's, lisp's, etc.) view of strings, or am I going to have
to go thru my many, many files and escape multi-line strings with
backslashes? What am I missing here?

David O Nelson, Ph.D. (daven at llnl.gov)
Lawrence Livermore National Laboratory
Box 808, L-441
Livermore CA 94551

ph:  +1.925.423.8898
fax: +1.925.422.2282


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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