title: gather with tidyr: position must be between 0 and n error
body: <p>I have some data like below:</p>
  
  <pre><code>x.row10 &lt;- setNames(data.frame(letters[1:3],1:3,2:4,3:5,4:6,5:7,6:8,7:9),
                      c("names",2004:2009,2012))
  #  names 2004 2005 2006 2007 2008 2009 2012
  #1     a    1    2    3    4    5    6    7
  #2     b    2    3    4    5    6    7    8
  #3     c    3    4    5    6    7    8    9
  </code></pre>
  
  <p>Now I can make them long with <code>gather()</code> from the <code>tidyr</code> package by writing: </p>
  
  <pre><code>x.row10  %&gt;% gather(Year, Val, -names)
  </code></pre>
  
  <p>But when I use </p>
  
  <pre><code>x.row10  %&gt;% gather(Year, Val, c(2004:2009,2012))
  </code></pre>
  
  <p>which is my intuitive choice, I get the error message</p>
  
  <blockquote>
    <p>Error: Position must be between 0 and n</p>
  </blockquote>
  
  <p>How come and how can this be resolved? </p>