[Rd] par(ask=TRUE) in R CMD check?

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Mar 12 17:55:55 CET 2011


On Sat, 12 Mar 2011, Spencer Graves wrote:

> Hello:
>
>      What happens in the auto-checks on R-Forge and CRAN with code using 
> par(ask=TRUE)?
>
>      Is this routine, or can it create problems?
>
>      The fda package uses ask=TRUE to provide the user with a way to examine 
> a group of plots.  In the past, I've marked those tests in \examples with 
> \dontrun.  However, I wonder if that is necessary.  I tried it on Windows 
> using R 2.12.0 and R Tools from that version, and R Tools seemed to supply 
> all the mouse clicks required.  However, before I "SVN Commit" to R-Forge, I 
> felt a need to ask.

No mouse clicks are needed!  par(ask=TRUE) is ignored on a pdf device 
(which is the non-interactive default device).  In any case, the help says

      ‘ask’ logical.  If ‘TRUE’ (and the R session is interactive) the
...
           This not really a graphics parameter, and its use is
           deprecated in favour of ‘devAskNewPage’.

See also the 'ask' argument in ?example.  What you say you want to do 
is the default behaviour of example(), and has been for some years.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-devel mailing list