Re: [R] Drawing a line in xyplot

2012-04-09 Thread John Maindonald
-project.org wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] Drawing a line in xyplot Date: 8 April 2012 2:17:22 PM AEST To: wcheckle wchec...@jhsph.edu Cc: r-help@r-project.org On Apr 7, 2012, at 10:29 PM, wcheckle wrote: Thank you David, the bwplot option does

Re: [R] Drawing a line in xyplot

2012-04-08 Thread ilai
On Sat, Apr 7, 2012 at 8:29 PM, wcheckle wchec...@jhsph.edu wrote: Thank you David, the bwplot option does what I need: snip However, I am interested in also learning how to do it in xyplot as well.  I wasn’t able to follow the last two set of instructions That was me. Sorry for any

Re: [R] Drawing a line in xyplot

2012-04-08 Thread John Maindonald
-requ...@r-project.org wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] Drawing a line in xyplot Date: 8 April 2012 2:17:22 PM AEST To: wcheckle wchec...@jhsph.edu Cc: r-help@r-project.org On Apr 7, 2012, at 10:29 PM, wcheckle wrote: Thank you David, the bwplot

Re: [R] Drawing a line in xyplot

2012-04-08 Thread David Winsemius
://www.maths.anu.edu.au/~johnm On 08/04/2012, at 8:00 PM, r-help-requ...@r-project.org wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] Drawing a line in xyplot Date: 8 April 2012 2:17:22 PM AEST To: wcheckle wchec...@jhsph.edu Cc: r-help@r-project.org On Apr 7, 2012, at 10:29 PM

Re: [R] Drawing a line in xyplot

2012-04-08 Thread wcheckle
i appreciate all the interest in my question, and thank you Elai for both of your suggestions, which work very well. Elai, your last code was particularly simple and helpful to generate the figure i was looking for. x11(height=8,width=11) par(lend=2) xdat = data.frame(mortality =c(5,

[R] Drawing a line in xyplot

2012-04-07 Thread wcheckle
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]),

Re: [R] Drawing a line in xyplot

2012-04-07 Thread David Winsemius
On Apr 6, 2012, at 9:41 PM, wcheckle wrote: i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines (

Re: [R] Drawing a line in xyplot

2012-04-07 Thread wcheckle
here is the data (fyi this is made-up data) x = as.data.frame ( cbind(c(5,8,7,5,8,10,11,6,4,5,20,25,27,30,35,32,28,21,20,34,11,15,18,12,15,12,10,15,19,20), c(1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3),c(1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,0,0)))

Re: [R] Drawing a line in xyplot

2012-04-07 Thread David Winsemius
On Apr 7, 2012, at 11:35 AM, wcheckle wrote: here is the data (fyi this is made-up data) x = as.data.frame ( cbind (c (5,8,7,5,8,10,11,6,4,5,20,25,27,30,35,32,28,21,20,34,11,15,18,12,15,12,10,15,19,20 ), c (1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3

Re: [R] Drawing a line in xyplot

2012-04-07 Thread ilai
On Sat, Apr 7, 2012 at 11:16 AM, David Winsemius dwinsem...@comcast.net wrote: xyplot(mortality ~ type, data=xdat,               panel=function(x,y){                   panel.xyplot(x,y, jitter.x=TRUE)                   panel.segments(x0=c(.9, 1.9, 2.9),                                  

Re: [R] Drawing a line in xyplot

2012-04-07 Thread wcheckle
Thank you David, the bwplot option does what I need: x11(height=8,width=11) bwplot ( mortality~ attend|type, pch=95,cex=5,col=2, par.settings=list( box.rectangle = list(col = transparent), box.umbrella = list(col = transparent), plot.symbol = list(col = transparent) ),

Re: [R] Drawing a line in xyplot

2012-04-07 Thread David Winsemius
On Apr 7, 2012, at 10:29 PM, wcheckle wrote: Thank you David, the bwplot option does what I need: x11(height=8,width=11) bwplot ( mortality~ attend|type, pch=95,cex=5,col=2, par.settings=list( box.rectangle = list(col = transparent), box.umbrella = list(col = transparent), plot.symbol =