Hi, I am working with R 1.81. When I call bwplot() it prints the output to the windows device as it should. For example, d<-data.frame(y=c(2,3,4,5,12,14,16,11),x=c(rep("group1",4),rep("group2",4))) bwplot(y~x,data=d) This code results in a parallel boxplot. That is a single plot with 2 boxplots next to each other; a boxplot for "group1" and a boxplot for "group2". However, if I call bwplot within a loop, the window device appears but nothing is plotted. for(i in c(1)){ print(i) bwplot(y~x,data=d) } Does anyone know why this is happening and how to solve it? Thanks, Steve [[alternative HTML version deleted]]
On Monday 22 March 2004 11:55, Steven Lacey wrote:> Hi, > > > > I am working with R 1.81. When I call bwplot() it prints the output > to the windows device as it should. For example, > > > > d<-data.frame(y=c(2,3,4,5,12,14,16,11),x=c(rep("group1",4),rep("group >2",4))) > > bwplot(y~x,data=d) > > > > This code results in a parallel boxplot. That is a single plot with 2 > boxplots next to each other; a boxplot for "group1" and a boxplot for > "group2". > > > > However, if I call bwplot within a loop, the window device appears > but nothing is plotted. > > > > for(i in c(1)){ > > print(i) > > bwplot(y~x,data=d)Replace this by print(bwplot(y~x,data=d))> } > > > > Does anyone know why this is happening and how to solve it? > > > > Thanks, > Steve > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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
On Mon, 22 Mar 2004, Steven Lacey wrote: [...]> However, if I call bwplot within a loop, the window device appears but > nothing is plotted.[...]> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlwhich asks you to read the FAQ, and this is Q7.24. -- 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