[R] Load a program at the front end

Gang Chen
Tue, 07 Oct 2008 16:23:27 -0000

Thanks a lot for the suggestion!

Unfortunately " R --no-save < prog.R" does not work well with my
situation because prog.R
contain lines such as readline() and () that require user response in
the middle of the
execution. I also tried other options such as "R -f prog.R" and
"R
--interactive < prog.R", and
they all failed.

Any other suggestions?

Thanks,
Gang


On Mon, Oct 6, 2008 at 10:12 PM, Bernardo Rangel Tura
<tura at centroin.com.br> wrote:
> Em Qui, 2008-10-02 ?s 14:36 -0400, Gang Chen escreveu:
>> I want to run a R program, prog.R,  interactively. My question is, is
>> there a way I can start prog.R on the shell terminal when invoking R,
>> instead of using source() inside R?
>>
>> TIA,
>> Gang
>
> Hi Gang
>
> I my system just only type:
>
>  R --no-save <prog.R
>
> platform       x86_64-unknown-linux-gnu
> arch           x86_64
> os             linux-gnu
> system         x86_64, linux-gnu
> status         Patched
> major          2
> minor          7.2
> year           2008
> month          09
> day            11
> svn rev        46532
> language       R
> version.string R version 2.7.2 Patched (2008-09-11 r46532)
>
> --
> Bernardo Rangel Tura, M.D,MPH,Ph.D
> National Institute of Cardiology
> Brazil