Re: [R] how to run a script at the beginning of an interacive session ?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 08 Jun 2005 - 13:05:32 EST

On 6/7/05, Mike R <mike.rstat@gmail.com> wrote:
> Hi All,
>
> How does one create an executable R-script, similar
> to an executable python script, or shell script except
> that when the R-script is finished, the R session remains
> open and becomes interactive.
>
> If I do this:
>
> R < script.r
>
> then R exits when finished.
>
> On the other hand, starting R then typing
>
> source("script.r",echo=T)
>
> is becoming tedious.

If you mean that you want to run certain R code every time you start up R then in R:

?Startup



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 08 13:13:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:27 EST