title: Why doesn't this lattice barchart wrapper work?
body: <p>I am trying to make a wrapper of the lattice barchart function like this (to make use of the ggplot theme by default):</p>
  
  <pre><code>require(ggplot2)
  require(lattice)
  require(latticeExtra)
  data(Titanic)
  mytheme = ggplot2like()
  gbarchart = function(...) {
      barchart(..., par.settings=mytheme)
  }
  gbarchart(Class ~ Freq | Sex + Age,
            as.data.frame(Titanic),
            groups = Survived,
            stack = TRUE,
            layout = c(4, 1),
            auto.key = list(title = "Survived", columns = 2),
            scales = list(x = "free"))
  </code></pre>
  
  <p>It gives an error:</p>
  
  <pre><code>Error in eval(expr, envir, enclos) : 
    ..3 used in an incorrect context, no ... to look in
  </code></pre>
  
  <p>While if the <code>par.settings=mytheme</code> is added to <code>barchart</code> directly, it works:</p>
  
  <pre><code>barchart(Class ~ Freq | Sex + Age,
            as.data.frame(Titanic),
            groups = Survived,
            stack = TRUE,
            layout = c(4, 1),
            auto.key = list(title = "Survived", columns = 2),
            scales = list(x = "free"),
            par.settings=mytheme)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/XiRH8.png" alt="enter image description here"></p>