title: Names missing from table() when called on a certain data.frame() with columnnames
body: <p><strong>Missing column-names from table()-output</strong></p>
  
  <p>The function table() will print the column-names of the dataframe in the table,
  when the data.frame() is created like this:</p>
  
  <pre><code>table(data.frame( var1 = "yes", var2 = "no") )
       var2
  var1  no
    yes  1
  </code></pre>
  
  <p>But when i create the data.frame() like this, the table()-function will
  not print any column names:</p>
  
  <pre><code>e1 &lt;- data.frame( smoking = "no", cvd = "no" ) 
  e1 &lt;- e1[rep(1,3495),]
  e2 &lt;- data.frame( smoking = "no", cvd = "yes" ) 
  e2 &lt;- e2[rep(1,57), ] 
  e3 &lt;- data.frame( smoking = "yes",cvd = "no")
  e3 &lt;- e3[rep(1,2112),]
  e4 &lt;- data.frame( smoking = "yes",cvd = "yes")
  e4 &lt;- e4[rep(1,75),]
  ee &lt;- rbind( e1,e2,e3,e4)
  </code></pre>
  
  <p>No names are printed in the table:</p>
  
  <pre><code>&gt; table( ee$smoking, ee$cvd)
  
          no  yes
    no  3495   57
    yes 2112   75
  </code></pre>
  
  <p>Despite the ee is actually a data.frame and has names:</p>
  
  <pre><code>&gt; class(ee)
  [1] "data.frame"
  &gt; names(ee)
  [1] "smoking" "cvd"    
  </code></pre>
  
  <p>So my question is why does the table()-function not print names when called
  on the ee-data.frame?</p>