title: Feeding data frame columns to xyplot panel functions
body: <p>I am using xyplot on a data frame and want to feed a panel function with data that is not the (x,y, ...) arguments, but some additional column of the data frame (say k in the example below):</p>
  
  <pre><code>library(lattice)
  
  mydata &lt;- data.frame(xxx = 1:20,
                       yyy = rbinom(20,20,.5),
                       uuu = gl(2,10),
                       k = rnorm(20))
  
  xyplot( formula = yyy ~ xxx | uuu, data = mydata,
          panel = function(x,y,k, ...){
                  n &lt;- x * k
                  panel.xyplot(n,y,...)
                  })
  </code></pre>
  
  <p>I understand that this will not work, because R does not feed this k column to the panel function. Is there a simple way to do so?</p>
  
  <p>(I'm not trying to just multiply x by k in my actual panel function. I'm calling another function that requires k...)</p>
  
  <p>Many thanks!</p>