title: How to add horizontal line to xy plot in lattice
body: <p>I'm using lattice to generate a plot that looks like the image below</p>
  
  <p>The code I'm using to generate the plot is:</p>
  
  <pre><code>xyplot(RMSE ~ Dimensions, data=afterdim,groups = paste("", Dim_Reduction),
  type = "l", auto.key =list(spline = "bottom", points = FALSE, lines = TRUE), 
  xlab="Dimensions", ylab="RMSE",scales=list(ylim=c(0,1)))
  </code></pre>
  
  <p>I would like to draw a horizontal line on this graph at <code>y-axis 0.23</code> with a different color. Purpose of adding the horizontal line is to show a baseline. Is this possible to do?</p>
  
  <p><img src="https://i.stack.imgur.com/XqJX6.png" alt="enter image description here"></p>
  
  <p>Sample data I'm using to plot is:</p>
  
  <pre><code>Dim_Reduction, Dimensions, Time, RMSE
  PCA, 9, 15.39, 0.287
  PCA, 8, 16.84, 0.290
  PCA, 7, 14.13, 0.289
  PCA, 6, 12.14, 0.292
  PCA, 5, 12.54, 0.293
  PCA, 4, 11.23, 0.295
  ICA, 11, 20.23, 0.287
  ICA, 10, 20.88, 0.288
  ICA, 9, 16.34, 0.290
  ICA, 8, 16.99, 0.294
  ICA, 7, 14.34, 0.291
  ICA, 6, 13.33, 0.292
  ICA, 5, 12.12, 0.294
  </code></pre>