2008/9/25 Peter Dalgaard <[EMAIL PROTECTED]>:
> John Chambers wrote:
>>
>> My application, at least, wanted to show (my class) individual commands
>> from the file and then optionally insert some typed commands before going on
>> to the next part of the source file. As far as I can see, the piped s
John Chambers wrote:
My application, at least, wanted to show (my class) individual
commands from the file and then optionally insert some typed commands
before going on to the next part of the source file. As far as I can
see, the piped shell command approach will have to treat the whole
file
Many thanks for the suggestions.
The use case I had in mind is more along the lines of what Peter
Dalgaard mentioned, and his solution looks ideal. I know in advance
exactly what code I want to run, but some of that code may require
user input.
Jon
2008/9/25 John Chambers <[EMAIL PROTECTED]>:
>
My application, at least, wanted to show (my class) individual commands
from the file and then optionally insert some typed commands before
going on to the next part of the source file. As far as I can see, the
piped shell command approach will have to treat the whole file at one time.
John
Pe
hadley wickham wrote:
>> I assume, given this outcome, that this is not the intended use of
>> --interactive, but I still wonder if there is any way to achieve an
>> interactive session based on a predefined set of commands without writing a
>> completely new front-end (overkill, surely?).
>>
> I assume, given this outcome, that this is not the intended use of
> --interactive, but I still wonder if there is any way to achieve an
> interactive session based on a predefined set of commands without writing a
> completely new front-end (overkill, surely?).
When you say an interactive sessi
One canonical way of doing it is:
(echo 'print(readline("Input:"))'; cat -) | R --interactive --no-save
(you don't want to leave out --no-save )
John Chambers wrote:
> For an alternative approach to your original goal, take a look at
> demoSource() in the SoDA package from CRAN. It's a bit
For an alternative approach to your original goal, take a look at
demoSource() in the SoDA package from CRAN. It's a bit tedious to set
up (see the Details section of the help file) but uses standard R
sessions to mix lines from a demo file and interactive input.
John
Jon Clayden wrote:
Dea