RからExcelに手軽にデータをコピーしたい時、
write.table(sample_data, file = "clipboard", sep="\t")
が便利なわけですが、
コピーしたいデータのサイズが大きいと、以下のエラーが出ます。
clipboard buffer is full and output lost
対処として
write.table(sample_data, file = "clipboard-16384", sep="\t")
と書くと、16Mくらいまでであれば、コピー可能になります。(これ以上は無理のようです)
どういうことかと言いますと、
"clipboard-**" → **の部分で、クリップボードの容量最大値を指定できるようです。
詳しくは下記をご参照下さい。(というかこの記事は下記の和訳です。)
https://stackoverflow.com/questions/32035119/how-to-solve-clipboard-buffer-is-full-and-output-lost-error-in-r-running-in-wi
R上にも明記があって、
?connection でClipboardの項を見ると、
"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."
とクリップボードの容量を変えられる記載があります。
よろしくお願いします。