Skip to content
Prev 12460 / 63461 Next

trellis.device in .First (PR#6812)

Extract from ?Startup

     Next, if a function '.First' is found on the search path, it is
     executed as '.First()'. Finally, function '.First.sys()' in the
     'base' package is run. This calls 'require' to attach the default
     packages specified by 'options("defaultPackages")'.

so again, this was documented in the (to me) obvious place.

Note `windows' is in package `graphics', a default package specified by
'options("defaultPackages")'.

It is a matter for discussion (with the lattice maintainer) whether 
trellis.device should help you out here by importing the devices from 
package graphics.  I think adding (conditionalized on the platform)

importFrom(graphics, windows, postscript, pdf, pictex, win.metafile, 
           win.print, png, jpeg, bmp, xfig, bitmap)

to its NAMESPACE might be worth considering.  Alternatively,
	device.call <- get(device)
could be put in a try call, followed by a try on 
	getFromNamespace("graphics", device).

BDR
On Fri, 23 Apr 2004, Prof Brian Ripley wrote: