[R] Re: Feedback requested on a solution to specifying R-scripts on the command line

From: Mike R <mike.rstat_at_gmail.com>
Date: Fri 10 Jun 2005 - 07:09:30 EST

On 6/8/05, Mike R <mike.rstat@gmail.com> wrote: <snip>
> From the command line, I'd like to be able to start an
> interactive R session and at the same time, be able
> to specify on the command line a project-specific or
> task-specific script (R code) that is to be executed
> at the beginning of the session.

My new version of .First:

.First <- function()
{
 print(version)
 cat("\n")
 CmdLineFilenames <<- strsplit(Sys.getenv("R_CUSTOM")," ")[[1]]  for ( fn in CmdLineFilenames )
 {
  cat( "sourcing ", fn, "\n" )
  source(fn)
 }
 cat("\n")
}

Best,
Mike



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 Fri Jun 10 07:16:10 2005

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