[R] Simple lattice graphics question

Sean Davis sdavis2 at mail.nih.gov
Wed May 5 00:05:13 CEST 2004


Dear all,

I am using panel graphics to do a stripplot of a variable versus a shingle
and putting a loess curve on the stripplot.  I want the data jittered, but I
can't seem to get the panel function to work.  This jitter's the data, but
of course doesn't give me the loess:

> stripplot((g[,3]) ~ c,jitter=T,pch=".",scales=list(y=list(log=T)))

But this doesn't give me any jittering.  What am I missing?

> stripplot(jitter(g[,3]) ~ c,scales=list(y=list(log=T)),panel=function(x,y)
{panel.stripplot(x,y,pch='.'); panel.loess(x,y,span=1)},jitter=T)

Thanks for any help.

Sean




More information about the R-help mailing list