From p.dalgaard@biostat.ku.dk  Fri Aug 31 18:21:06 2001
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 31 Aug 2001 19:21:06 +0200
Subject: [Rd] --quiet flag sets echo option to TRUE (PR#1083)
In-Reply-To: <200108311708.TAA09196@pubhealth.ku.dk>
References: <200108311708.TAA09196@pubhealth.ku.dk>
Message-ID: <x2zo8gqh6l.fsf@blueberry.kubism.ku.dk>

a296180@mica.fmr.com writes:

> The help for options says:
> 
>     echo: logical.  Only used in non-interactive mode, when it controls
>           whether input is echoed. Command-line options `--quiet' and
>           `--slave' set this initially to `FALSE'.
> 
> I don't think that this is correct for me.
> 
> 
> Consider the following session:
> 
> mica|junk> ls
> test.R
> mica|junk> cat test.R 
> cat("Why was this command echoed?\n")
> mica|junk> R CMD BATCH --quiet test.R 
> mica|junk> ls
> test.R		test.Rout
> mica|junk> cat test.Rout 
> > invisible(options(echo = TRUE))
> > cat("Why was this command echoed?\n")
> Why was this command echoed?
> > proc.time()
> [1] 1.13 0.11 1.20 0.00 0.00
> > 
> mica|junk> 
> 
> Either using --quiet should set echo to FALSE (my personal preference) or the
> documentation for options should be changed.
> 
> Apologies if I have misunderstood something here.

You seem to be right, but since BATCH is messing with options()
itself, your example doesn't prove it. However, this does:

[pd@blueberry R]$ R --quiet --vanilla < test.R
> cat("Why was this command echoed?\n")
Why was this command echoed?
>

(with 1.3.1)

Since --slave turns the echoing off, and it is nice to be able to
kill just the startup blurb, my vote is to change the docs.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] --quiet flag sets echo option to TRUE (PR#1083)
Peter Dalgaard BSA