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
If you type ?connections
you will find your answer.
This is the relevant part:
"When writing to the clipboard, the output is copied to the clipboard only when the connection is closed or flushed. There is a 32Kb limit on the text to be written to the clipboard. This can be raised by using e.g. file("clipboard-128") to give 128Kb."
So, the solution is pretty straigthforward:
df1 <- data.frame(x=runif(10000))
write.table(df1, file="clipboard-16384", sep="\t", col.names=NA)
Note that the number of Kb is just an example, so you can change it as you need (I put 2^14 that should be more than enough for your data set, but you can increase it even more. Not sure which is the hard limit, though. Maybe physical memory?)