1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RでClipboardにコピーする方法

1
Posted at

Clipbordへのコピー

会社で案外知らない人がいることを知ったので、こちらでも共有

write.table(table, "clipboard", sep = "\t")

これでクリップボードにコピーできるので、エクセルへctrl + vで貼り付けられます!

例えばこんなかんじに

# 下記のデータがあった場合に、、、
> table
   unit price freq temp
1     1     1    4    5
2     5     2    3    2
3     2     3    5    2
4     4     4    2    4
5     2     1    4    5
6     4     2    6    7
7     4     3    4    6
8     3     4    7    2
9     5     1    5    4
10    2     2    6    3
11    4     3    7    6
12    5     4    6    7
13    4     1    5    5
14    2     2    2    4
15    5     3    6    2
16    4     4    4    3

> write.table(table, "clipboard", sep ="\t", row.names = FALSE)

これでコピーされたので、エクセルのctrl + vで貼り付けできます。

(貼り付けたところのキャプチャー)
Untitled.jpg

はてなブログもはじめました

良ければこちらも見ていただけると喜びます。
ゆくゆくはコード以外の雑多なことははてなブログに記載しようかな思ってます。
https://data-analy.hatenablog.com/

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?