Hi all,

I’ve noticed that a script with unmatched brackets of any sort will fail
silently in Rscript—neither logging nor any output in the shell indicates
that anything went wrong. Example file to run in Rscript:

sink('/tmp/exampleoutfile')
a <- 0
{
  print(a)

Replacing the ‘{‘ with any other symbol that must be matched (quotes,
parens, etc.) results in the same kind of silent failure. One workaround is
to use

echo "source('myscript.R')" | R --no-save --no-restore

from the command line but that’s a kludge. My apologies if this has been
brought up before, but doing a quick search I didn’t find anything, and to
me this seems like a significant bug.

Thanks & best,
Luke
​

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to