title: rbind data.frames without names
body: <p>I am trying to figure out why the <code>rbind</code> function is not working as intended when joining data.frames without names.
  Here is my testing:</p>
  
  <pre><code>test &lt;- data.frame(
              id=rep(c("a","b"),each=3),
              time=rep(1:3,2),
              black=1:6,
              white=1:6,
              stringsAsFactors=FALSE
              )
  
  # take some subsets with different names
  pt1 &lt;- test[,c(1,2,3)]
  pt2 &lt;- test[,c(1,2,4)]
  
  # method 1 - rename to same names - works
  names(pt2) &lt;- names(pt1)
  rbind(pt1,pt2)
  
  # method 2 - works - even with duplicate names
  names(pt1) &lt;- letters[c(1,1,1)]
  names(pt2) &lt;- letters[c(1,1,1)]
  rbind(pt1,pt2)
  
  # method 3 - works  - with a vector of NA's as names
  names(pt1) &lt;- rep(NA,ncol(pt1))
  names(pt2) &lt;- rep(NA,ncol(pt2))
  rbind(pt1,pt2)
  
  # method 4 - but... does not work without names at all?
  pt1 &lt;- unname(pt1)
  pt2 &lt;- unname(pt2)
  rbind(pt1,pt2)
  </code></pre>
  
  <p>This seems a bit odd to me. Am I missing a good reason why this shouldn't work out of the box?</p>
  
  <p><strong>edit for additional info</strong></p>
  
  <p>Using @JoshO'Brien's suggestion to <code>debug</code>, I can identify the error as occurring during this <code>if</code> statement part of  the <code>rbind.data.frame</code> function </p>
  
  <pre><code>if (is.null(pi) || is.na(jj &lt;- pi[[j]]))
  </code></pre>
  
  <p>(online version of code here: <a href="http://svn.r-project.org/R/trunk/src/library/base/R/dataframe.R" rel="nofollow">http://svn.r-project.org/R/trunk/src/library/base/R/dataframe.R</a> starting at: "<em>### Here are the methods for rbind and cbind.</em>")</p>
  
  <p>From stepping through the program, the value of <code>pi</code> does not appear to have been set at this point, hence the program tries to index the built-in constant <code>pi</code> like <code>pi[[3]]</code> and errors out.</p>
  
  <p>From what I can figure, the internal <code>pi</code> object doesn't appear to be set due to this earlier line where <code>clabs</code> has been initialized as <code>NULL</code>:</p>
  
  <pre><code>if (is.null(clabs)) clabs &lt;- names(xi) else { #pi gets set here
  </code></pre>
  
  <p>I am in a tangle trying to figure this out, but will update as it comes together.</p>