title: R - xyplot (lattice); multiple response (Y axis) - how do I identify individual points?
body: <p>I've generated a lattice plot with 2 response variables plotted on a single Y axis).  I have plotted one of the response variables as a line (Response1 below), the other (Response2) as points on that same Y axis.  I wish to be able to highlight some of the points (in Response 2) according to a condition ('Condition'), for example, if Condition==1 then change the point color to blue and increase the point size and change the symbol.  The fact that I wish to plot two response variables on the same axis excludes the 'Group' option for this and, consequently, the panel.superpose function (as far as i can tell).  Example code is given below:   </p>
  
  <pre><code>library(lattice)
  #generate dataframe
  TD=data.frame(Response1=rnorm(100,50,5),Response2=rnorm(100,70,5),
  Xaxis=seq(1:100),Factor=rep(LETTERS[1:5],20),
  Condition=sample(0:1,100,replace=T))
  #generate plot          
  xyplot(Response1+Response2~Xaxis|Factor,data=TD,distribute.type=TRUE,
  type=c('l','p'))
  #if(condition==1) then Response2 symbol=blue and size is larger??
  </code></pre>
  
  <p>I have tried to do this via latticeExtra's doubleYScale plot (using a 'group' argument' in one of the plots to condition on 'Condition') but this is lost when the overlay is made.  </p>
  
  <p>Any guidance on this would be much appreciated.</p>
  
  <p>Regards</p>
  
  <p>Tom. </p>