Re: [S] xyplot function

Cande V Ananth (ananthcv@epi.umdnj.edu)
Tue, 8 Sep 1998 10:53:13 -0400


Thanks to Drs Ripley, Pinheiro, Clark, and Smith for pointing out
the usefulness of the ordered() function. It worked !

> Dear S'ers:
>
> I'm trying to use the "xyplot" function to produce a scatter plot with
> a loess smooth, with the plots stratified on a third variable. The
> stratifying variable has 4 levels, coded "No-abrupt", "<25%", "25-49%",
> and "50+%". Everything works fine except that the order in which
> the plots appear is not the one that I'd like to see.
>
> The function plots in the following order: "<25%", "No-abrupt", "25-49%",
> and "50+%". I'd like to see it plot exactly as I have described the 4
> levels in the preceding paragraph. Here's the code that I used:
>
> > xyplot(bwt ~ ga | abpl, aspect=1,
> > panel = function(x,y){
> > panel.xyplot(x,y)
> > panel.loess(x,y,span=0.3,lwd=2)}
> > )

--
Cande V. Ananth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assistant Professor                       Tel: (732) 235-7940
Div of Epidemiology and Biostatistics     Fax: (732) 235-6627
Dept of OB/GYN and Reproductive Sciences  ananthcv@EPI.UMDNJ.EDU
UMDNJ-Robert Wood Johnson Medical School  http://www.rwj-obgyn.umdnj.edu/
125 Paterson St, New Brunswick NJ 08901      homepages/Ananth/ananth.html   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news