[R] problem with win.metafile( ): traceback()

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


For the first error message:

> win.metafile(file = "//.../plot1.wmf",
+ width = 8.5, height = 6.25)

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

> traceback()
4: get(device)
3: trellis.device(device = .Device, new = FALSE)
2: trellis.par.get(item)
1: lset(list(background = list(col = "white")))


For the second error message:

> 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)
+ }
+         )
Error in get(x, envir, mode, inherits) : 
variable "win.metafile://.../plot1.wmf" was not found

> traceback()
6: get(device)
5: trellis.device(device = .Device, new = FALSE)
4: trellis.par.get("add.text")
3: trellis.skeleton(aspect = "fill", strip = TRUE, panel = function (x, 
       y, panel.number, ...) 
   {
       panel.superpose(x = Group1$TIME, y = Group1$y, 
           subscripts = TRUE, groups = Group1$ID, type = "l", col =
gray(0.6))
       sup.sym <- trellis.par.get("superpose.symbol")
       panel.xyplot(x, y, type = "b", col = "black", lwd = 4, cex = 1.5, 
           ...)
   }
2: do.call("trellis.skeleton", c(list(aspect = aspect, strip = strip, 
       panel = panel), dots))
1: xyplot(y ~ x | ID, data = Group1, scales = list(alternating = FALSE), 
       ylim = c(0.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(0.6))
           sup.sym <- trellis.par.get("superpose.symbol")
           panel.xyplot(x, y, type = "b", col = "black", lwd = 4, 
               cex = 1.5, ...)
       })


-----Original Message-----
From: Paul, David A 
Sent: Sunday, October 19, 2003 12:28 PM
To: 'r-help at stat.math.ethz.ch'
Subject: [R] problem with win.metafile( )


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

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list