"Kissell, Robert [EQRE]" <[EMAIL PROTECTED]> writes:

> Right Now I have a function that runs these commands. Also, I can
> easily COPY the commands from some editor (e.g., Word) and PASTE to
> the R Console, and R will automatically run the commands.
> 
> The question is, Is there anyway to invoke a series of commands
> outside of the function? In MatLab, as I mentioned, I would save the
> commands in a script file say TEST.m and run the commands from the
> MatLab command line prompt simply by typing TEST <enter>.
> 
> Thanks in advance.

source("foo.R")   # in R
R CMD BATCH foo.R # from a command line interface
Rcmd BATCH foo.R  # Windows variation of same

Was this really not to be found in any of the documents available to
you?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])             FAX: (+45) 35327907

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to