Have you considered enclosing the "very long string" in parentheses? Then R will know that it is not syntactically correct until it reaches the end. To avoid that kind of thing, I routinely include "(" just to the right of "<-" in virtually any statement that might otherwise get split onto two lines in a way that the first might be evaluated without the second.

hope this helps. spencer graves
p.s. I got this from Venables and Ripley, but I can't remember which book or which page.


[EMAIL PROTECTED] wrote:

Hallo all,

I got a problem executing R in batch-mode via a perl-script (under Win2000) : system ("Rterm.exe --slave --no-save --no-restore \<Rfile.r \>NUL");
The R execution is aborting with syntax error due to very-long lines.
My solution is converting
a <- c("very long string")
to
a <- paste("short string 1",\n
"short string 2",\n
...,\n
"short string n")
It is not very elegant ...
Does anybody know a better solution ?


Thank you in advance,
Alessandro Valli

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help



______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to