R-devel is the list for enhancement requests.
On Tue, 19 Aug 2008, Richard M. Heiberger wrote:
Currently (R-2.7.1 on Windows)
bringToTop(stay=TRUE)
when run before a device is opened, gives the error message
bringToTop(stay=TRUE)
Error in bringToTop(stay = TRUE) :
can only bring windows devices to the front
In the same circumstances, a call to par() opens a device.
But not necessarily a windows() device.
My request is to modify bringToTop(). If bringToTop()
determines that it is running in an interactive environment,
then it could open a graphics window and honor the request
to put the newly opened window on Top.
Only if the default graphics device were windows(). It could be Cairo(),
for example.
bringToTop() applies to a device number, which defaults to dev.cur() which
defaults to 1. Unlike par() it is not confined to the current device.
You can very easily program what you seem to want. E.g.
if(.Device == "null device") windows() else bringToTop()
or perhaps
if(.Device != "windows") windows() else bringToTop()
Normally opening a device brings it to the top: for Rterm users
it might not but then bringToTop() may not either.
--
Brian D. Ripley, [EMAIL PROTECTED]
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
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.