title: How to solve "clipboard buffer is full and output lost" error in R running in Windows?
body: <p>I am trying to copy some data directly from R to the clipboard, in my Windows machine. I found in some sites that using file="clipboard" would work. And it does, but for very small datasets.</p>
  
  <p>For example:</p>
  
  <p>If I copy a small dataset (100 obs), it works smoothly.</p>
  
  <pre><code>df1 &lt;- data.frame(x=runif(100))
  write.table(df1, file="clipboard", sep="\t", col.names=NA)
  </code></pre>
  
  <p>But if I increase the observations to 10,000, it fails:</p>
  
  <pre><code>df1 &lt;- data.frame(x=runif(10000))
  write.table(df1, file="clipboard", sep="\t", col.names=NA)
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Warning message: In .External2(C_writetable, x, file, nrow(x), p, r</p>
  </blockquote>
  
  <p>Any workaround to this?</p>