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

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Sat, 23 Mar 1996 13:31:22 +1200


Date: Sat, 23 Mar 1996 13:31:22 +1200
From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Message-Id: <199603230131.NAA27140@stat.auckland.ac.nz>
To: R-testers@stat.math.ethz.ch
Subject: R-alpha: pipe to 'R' // R reading  stdin -- "save workspace ?" problem
In-Reply-To: <199603221706.SAA12967@florence.ethz.ch>

Martin Maechler writes:
 > 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.

[ If you haven't tried this -- it causes the question of whether
you want your data saved to be raised rather relentlessly ].

When we have a Unix Gui, the problem will go away.  You won't be able
to invoke R this way ... :-)

We tend to think cross-platform on issues like this and aim at the
lowest common denominator.  Since the Mac doesn't have a command
line interface you can't pipe input to a program.  We thus haven't
addressed the issue.

In fact low-level issues like how input is delivered to the parser are
very much in a temporary state and I wouldn't want to put too much
work into it until we really have a workable cross-platform design.

What we could do simply (i.e. for 0.4) is assume either a yes or no
response do the "Do you want to save your data?" question if an EOF
happens.  Should the assumed response be "yes" or "no".
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-