On 1/4/06, Gregory Snow <[EMAIL PROTECTED]> wrote:
> Here is one approach using lattice (trellis) graphics:
>
> tmp.state <- data.frame( Frost=state.x77[,'Frost'],
>       Murder=state.x77[,'Murder'],
>       Region=state.region)
>
> library(lattice)
> trellis.par.set(col.whitebg())
> xyplot( Murder ~ Frost, groups=Region, data=tmp.state,
>       panel.groups=function(...){panel.loess(...);panel.xyplot(...)}
> ,span=.8)

which can be shortened to

xyplot(Murder ~ Frost, groups=Region, data=tmp.state,
       type = c('p', 'smooth'), span = .8)

-Deepayan

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to