Re: [R] Help with evaluation of expressions

From: Dieter Menne <>
Date: Sat 03 Jun 2006 - 00:09:29 EST

Michael Conklin <michael.conklin <at>> writes:

> I have searched through the help files and I have been unsuccessful in
> solving this problem.
> I am trying to create a small wrapper function that will go around a
> call to a plot function and create a windows metafile in the directory
> and also write the name of the file to a text file. The purpose is to
> efficiently bring a large number of plots into powerpoint. I am using
> platform

Try this variant. Note that I am using emf instead of wmf, it's a bit more stable. And I had to prepare an undecorated filename since savePlot has special ideas about appending appendixes.

Please, if you post, provide a full working demo example next time, not only the function. There are only few genius who can see the right way without firing up the gui.


  numslide<-length(dir(pattern="emf"))+1   fname0<-paste("SG",numslide,sep="")
  if (length(dirlist)==1){

    close(fs)} else {
  if (is.null(p)) {
  } else {
    trellis.device(device = win.metafile, theme = "col.whitebg", new = TRUE, retain = FALSE, file=fname,width=6,height=4)



  xyplot(Sepal.Length ~ Petal.Length, data = iris) ) mailing list PLEASE do read the posting guide! Received on Sat Jun 03 01:28:36 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 03 Jun 2006 - 02:10:29 EST.

Mailing list information is available at Please read the posting guide before posting to the list.