Help us understand the problem. What is going on with this article?

Rのクリップボード出力時の容量最大値を上げる

More than 1 year has passed since last update.

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."
とクリップボードの容量を変えられる記載があります。

よろしくお願いします。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした