From henrik.bengtsson at ucsf.edu  Tue Sep 22 19:48:49 2015
From: henrik.bengtsson at ucsf.edu (Henrik Bengtsson)
Date: Tue, 22 Sep 2015 10:48:49 -0700
Subject: [Rd] Rscript --args -e <cmd> / R --vanilla --slave --args -e <cmd>
 opens an interactive R session
Message-ID: <CAFDcVCTmK7F6Y0RsUaAAETz+8LjFpxnxKqdZPE3YtVAaFnBbgw@mail.gmail.com>

When using Rscript -e <cmd>, (mistakenly) putting --args in front of
-e causes an interactive R session to start that does not quit
automatically and that does not display a prompt. For example,

{hb}: Rscript --vanilla -e "0"
[1] 0

{hb}: Rscript --vanilla -e "0" --args
[1] 0

{hb}: Rscript --vanilla --args -e "0"
1
[1] 1
2
[1] 2
quit("no")

Further troubleshooting narrows this down to:

{hb}: R --vanilla --slave --args -e 0
1
[1] 1
quit('no')

having this problem.

/Henrik



[Rd] Rscript --args -e <cmd> / R --vanilla --slave --args -e <cmd> opens an interactive R session
Henrik Bengtsson