From plroebuck at mdanderson.org  Fri May  9 08:28:19 2008
From: plroebuck at mdanderson.org (Paul Roebuck)
Date: Fri, 9 May 2008 01:28:19 -0500 (CDT)
Subject: [Rd] R-2.8.0 : get platform device with get(getOption("device"))
In-Reply-To: <48229EBB.3060903@biostat.ku.dk>
References: <8613cc220805070831w5e52a1cvf9ff93e8a33c16c6@mail.gmail.com>
	<alpine.LFD.1.10.0805072004010.32764@gannet.stats.ox.ac.uk>
	<482233E8.5090605@biostat.ku.dk>
	<alpine.LFD.1.10.0805080530350.3094@gannet.stats.ox.ac.uk>
	<48229EBB.3060903@biostat.ku.dk>
Message-ID: <Pine.OSF.4.58.0805082328330.130895@wotan.mdacc.tmc.edu>

On Thu, 8 May 2008, Peter Dalgaard wrote:

> Prof Brian Ripley wrote:
> > Here is the NEWS item, for 2.5.0
> >
> >     o    options(device = ) now accepts a function object as well as
> >     the name of a function.
> >
> > The construct in the subject line has been broken ever since.

Yet the change produced no warnings when made, so apparently
everyone else missed it!

> OK, but that entry was obviously hard to spot even when looking for it!
> >
> > On Thu, 8 May 2008, Peter Dalgaard wrote:
> >
> >> Prof Brian Ripley wrote:
> >>> Please do study the posting guide.  This was covered recently:
> >>>
> >>> https://stat.ethz.ch/pipermail/r-devel/2008-April/049319.html
> >> Nevertheless, perhaps an explicit NEWS entry could be warranted,
> >> something like
> >>
> >>  o    The "device" option can now be a function, and is one in some
> >> standard setups. Consequentially, get(getOption("device")) will fail;
> >> programmers should usually use dev.new() instead.
> >>
> So...
>
> o    The "device" option now is a function in some standard setups.
> Consequentially, get(getOption("device")) will fail; programmers should
> usually use dev.new() instead. (Assuming that the device is a character
> string has been incorrect since 2.5.0.)
>

Prof Brian Ripley noted [in another recent message] that
it was also wrong to assume ANY arguments for dev.new
method. If we are only concerned with interactive screen
devices (i.e., x11, windows, quartz), would it be safe to
come up with a method that can take basic dimension arguments
(width & height)? Suggestions for an R-Core approved method
of doing so?

We use this functionality every day for creating multiple
onscreen windows with specified dimensions.

While I understand things have to change to evolve the
codebase, this change broke the code supporting countless
papers and analyses here in our department, without warning
until now.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



[Rd] R-2.8.0 : get platform device with get(getOption("device"))
Paul Roebuck