[R] problem with win.metafile( )

Paul, David A paulda at BATTELLE.ORG
Sun Oct 19 18:28:17 CEST 2003


R1.8.0, Win2k:

When I paste the code


win.metafile(file = "//.../plot1.wmf",
	width = 8.5, height = 6.25)
lset( list( background = list(col = "white")))	
xyplot( y ~ x | ID, data = Group1,
	scales = list(alternating = FALSE),
	ylim = c(.75,y.max),
	panel = function(x, y, panel.number, ... )
		{
			panel.superpose(x = Group1$TIME, y = Group1$y,
					subscripts = TRUE, groups =
Group1$ID,
					type = 'l', col = gray(.6))
			sup.sym <- trellis.par.get("superpose.symbol")
			panel.xyplot(x, y, type = 'b', col = "black", 
						lwd = 4, cex = 1.5, ...)
			panel.loess(x = Group1$TIME, y = Group1$y, 
			col = gray(.2), lwd = 3, lty = 5, span = 1/3)
		}
        )
dev.off()


into R1.8.0 I get the following messages:

...... 

> lset( list( background = list(col = "white")))
Error in get(x, envir, mode, inherits) : 
variable "win.metafile://.../plot1.wmf" was not found

...... 

> xyplot( ...... )
Error in get(x, envir, mode, inherits) : 
variable "win.metafile://.../plot1.wmf" was not found
> 
> dev.off()
null device 
          1


If I change the first command in this script to

trellis.device(postscript, file = "//.../plot1.ps", color = TRUE)

I get no errors.  I also get no errors if I run the above script
in R1.7.1.  Are there any known issues with win.metafile( ) in R1.8.0?
Should I reinstall?  Any help would be appreciated.


-david paul




More information about the R-help mailing list