R-alpha: pipe to 'R' // R reading stdin -- "save workspace ?" problem

Martin Maechler (maechler@stat.math.ethz.ch)
Fri, 22 Mar 1996 18:06:30 +0100


Date: Fri, 22 Mar 1996 18:06:30 +0100
Message-Id: <199603221706.SAA12967@florence.ethz.ch>
From: Martin Maechler <maechler@stat.math.ethz.ch>
To: R-testers mailing list <R-testers@stat.math.ethz.ch>
Subject: R-alpha: pipe to 'R' // R reading  stdin -- "save workspace ?" problem

Try the following in your Unix shell:

	echo 'license()' | R

(and be ready to press  C-z  (control Z) since  C-c  does not work for me.

The same problem when you try

	R < some_input_file > output_file


This shouldn't be too hard to fix, I believe.



In S there is the nice thing

	if(interactive()) { .... }

The function q()  may then use such a an  if statement...

Martin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-