Dear all, I am trying to use xyplot inside a function plotme<-function(dataframe) { xyplot(x~y|z,data=dataframe) } x,y,z are members of the data frame. When calling function library(lattice) plotme(dataframe) nothing happens. (R-1.8.0, SuSe Linux 8.1) What am I doing wrong? Many thanks in advance Peter
Need to wrap the xyplot() in print(), as in print(xyplot(...)) Andy> From: Dr. Peter Schlattmann > > Dear all, > > I am trying to use xyplot inside a function > > plotme<-function(dataframe) > { > xyplot(x~y|z,data=dataframe) > } > > x,y,z are members of the data frame. > > When calling function > > library(lattice) > plotme(dataframe) > > nothing happens. (R-1.8.0, SuSe Linux 8.1) > > What am I doing wrong? Many thanks in advance > > Peter