[R] batch mode in linux

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Jul 27 22:30:20 CEST 2000

"John P. Burkett" <burkett at uriacc.uri.edu> writes:

> I'm trying to learn how to use R version 1.1.0 under Mandrake Linux
> version 6.1.  Using R interactively, I get good results.  However, when
> I attempt to execute commands from a file (following the directions in
> section 1.10 of An Introduction to R, version 1.10) my output
> disappears.  As a default or after a sink() command, I would expect to
> see output on the console, but none appears.  After a sink("record.lis")
> command, I would expect to find the output in the record.lis file, but
> it is empty.  The commands in my input file (e.g., summary(fm)) produce
> output in interactive mode, so I don't understand why no output appears
> in batch mode.  Any error in the input file produces an error message on
> the console.  But when I correct the error, there is still no visible
> output.  Any help would be appreciated.

I.e. you're using source(), which is not actually batch mode. (See
help(BATCH) for the real thing). The default for source() is not to
print commands and their output, try setting echo=T.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list