title: specs argument in emmeans function with R
body: <p>I'm trying to figure out to do posthoc test in R with <code>emmeans</code> function from <code>emmeans</code> package. However, I couldn't find out what should I put in specs argument. as far as I understand it is where I put the variables that I want to contrast (my independent variables). However, when I put my IV/IVs It gives errors. I'm putting my code and errors below:</p>
  
  <pre><code>X= as.factor(rep(c("A", "B", "C"), each= 50))
  Y= as.factor(c("K", "L", "M"), times= 50)
  Z= rnorm(150)
  Model= lm(Z ~ X+Y+X:Y)
  emmeans(Model, X)
  </code></pre>
  
  <blockquote>
    <p>`error no variable named a in reference grid.</p>
  </blockquote>
  
  <p>I guess specs argument is something totally different from what I think. 
  I want to contrast both main effects and interaction effects. How can I do it with <code>emmeans</code> function?<br>
  Best regards</p>