Hallo! I want to plot grouped data in a wmf-file. The following example gives an error: library(lattice) library(nlme) data(Loblolly) # example data from nlme win.metafile("Loblolly.wmf") plot(Loblolly) dev.off() After the plot(Loblolly) the following error occurs: "Error in get(x, envir, mode, inherits) : variable "win.metafile:Loblolly.wmf" was not found" The file Loblolly.wmf exists but is just white. With "normal" plot it works, e.g.: win.metafile("Loblolly2.wmf") plot(Loblolly$age, Loblolly$height) dev.off() Does anybody know how to solve the problem above or a nice workaround? (Using plotSave works in general but the colors are bad.) Karl
This seems to be a rather common error: Use trellis.device(win.metafile, file="Loblolly.wmf") instead of calling win.metafile() directly. HTH, Andy> From: Karl Knoblick > > Hallo! > > I want to plot grouped data in a wmf-file. The > following example gives an error: > > library(lattice) > library(nlme) > data(Loblolly) # example data from nlme > win.metafile("Loblolly.wmf") > plot(Loblolly) > dev.off() > > After the plot(Loblolly) the following error occurs: > "Error in get(x, envir, mode, inherits) : variable > "win.metafile:Loblolly.wmf" was not found" > The file Loblolly.wmf exists but is just white. > > With "normal" plot it works, e.g.: > win.metafile("Loblolly2.wmf") > plot(Loblolly$age, Loblolly$height) > dev.off() > > Does anybody know how to solve the problem above or a > nice workaround? > (Using plotSave works in general but the colors are > bad.) > > Karl------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
What is your version of R, nlme and lattice (and have you run update.packages() recently)? This works correctly for me in the current versions. On Thu, 8 Jan 2004, Karl Knoblick wrote:> Hallo! > > I want to plot grouped data in a wmf-file. The > following example gives an error: > > library(lattice)Not needed, BTW, as done by nlme.> library(nlme) > data(Loblolly) # example data from nlme > win.metafile("Loblolly.wmf") > plot(Loblolly) > dev.off() > > After the plot(Loblolly) the following error occurs: > "Error in get(x, envir, mode, inherits) : variable > "win.metafile:Loblolly.wmf" was not found" > The file Loblolly.wmf exists but is just white. > > With "normal" plot it works, e.g.: > win.metafile("Loblolly2.wmf") > plot(Loblolly$age, Loblolly$height) > dev.off() > > Does anybody know how to solve the problem above or a > nice workaround? > (Using plotSave works in general but the colors are > bad.) > > Karl > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >-- Brian D. Ripley, ripley at stats.ox.ac.uk 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
Karl Knoblick a ?crit :> Hallo! > > I want to plot grouped data in a wmf-file. The > following example gives an error: > > library(lattice) > library(nlme) > data(Loblolly) # example data from nlme > win.metafile("Loblolly.wmf") > plot(Loblolly) > dev.off() > > After the plot(Loblolly) the following error occurs: > "Error in get(x, envir, mode, inherits) : variable > "win.metafile:Loblolly.wmf" was not found" > The file Loblolly.wmf exists but is just white. > > With "normal" plot it works, e.g.: > win.metafile("Loblolly2.wmf") > plot(Loblolly$age, Loblolly$height) > dev.off() > > Does anybody know how to solve the problem above or a > nice workaround? > (Using plotSave works in general but the colors are > bad.) > > Karl > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >library(nlme) data(Loblolly) # example data from nlme plot(Loblolly) dev.copy(win.metafile, filename = "Loblolly.wmf") dev.off() works fine for me Best, Renaud -- Dr Renaud Lancelot v?t?rinaire ?pid?miologiste Ambassade de France - SCAC BP 834 Antannarivo 101 Madagascar t?l. +261 (0)32 04 824 55 (cell) +261 (0)20 22 494 37 (home)