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

From: Mike R <>
Date: Thu 09 Jun 2005 - 04:32:33 EST

On 6/8/05, Marc Schwartz <> wrote: <snips>

Thanks Marc,

Cool ideas, thanks! Building on them, here is a twist.

With this line in .Rprofile:

  .First <- function() {if(Sys.getenv("R_PROJECT")!="") source(Sys.getenv("R_PROJECT"))}

R can be run with this bash command line:

## export R_PROJECT=project_A.R; R; unset R_PROJECT

Alternatively, R could be run with this bash command line:

## wrapR project_4.R

What do you think?

Thanks in advance,
Mike mailing list PLEASE do read the posting guide! Received on Thu Jun 09 04:41:14 2005

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