回答編集履歴

2

Update

2021/12/31 16:33

投稿

melian
melian

スコア20655

test CHANGED
@@ -12,12 +12,12 @@
12
12
 
13
13
  plot(0, 0, type = "n", xlim = c(0, 3), ylim = c(0, 9), xaxt="n", yaxt="n", xlab = "", ylab = "", bty="n")
14
14
 
15
- text(1, 1, intToUtf8(0x1F305), col = "red", cex = 10, adj = 0)
15
+ text(1, 4, intToUtf8(0x1F305), col = "red", cex = 10, adj = 0)
16
16
 
17
- text(1.6, 1, intToUtf8(0x1F38D), col = "red", cex = 10, adj = 0)
17
+ text(1.6, 4, intToUtf8(0x1F38D), col = "red", cex = 10, adj = 0)
18
18
 
19
19
  dev.off()
20
20
 
21
21
  ```
22
22
 
23
- ![emoji](6542242ed94f97de7fee8107f928ae3e.png)
23
+ ![emoji](e2587c2b47453dfedacdd24c3c076c69.png)

1

Update

2021/12/31 16:33

投稿

melian
melian

スコア20655

test CHANGED
@@ -1,21 +1,23 @@
1
- 参考でに、こちらの環境では絵文字が表示されます。もしかするとフォント設定の問題かもしれませんね。
1
+ `intToUtf8` を使います。
2
2
 
3
3
 
4
4
 
5
- ```r
6
-
7
- $ R
8
-
9
- R version 4.1.2 (2021-11-01) -- "Bird Hippie"
5
+ [Convert Integer Vectors to or from UTF-8-encoded Character](https://stat.ethz.ch/R-manual/R-devel/library/base/html/utf8Conversion.html)
10
6
 
11
7
 
12
8
 
13
- > library("remoji")
9
+ ```R
14
10
 
11
+ png("1.png", width = 600, height = 300, bg="transparent") # 描画デバイスを開く
12
+
13
+ plot(0, 0, type = "n", xlim = c(0, 3), ylim = c(0, 9), xaxt="n", yaxt="n", xlab = "", ylab = "", bty="n")
14
+
15
- > message(emoji(list_emoji(), TRUE))
15
+ text(1, 1, intToUtf8(0x1F305), col = "red", cex = 10, adj = 0)
16
+
17
+ text(1.6, 1, intToUtf8(0x1F38D), col = "red", cex = 10, adj = 0)
18
+
19
+ dev.off()
16
20
 
17
21
  ```
18
22
 
19
-
20
-
21
- ![emoji](d36e242856763218114b0e52f8ec659f.png)
23
+ ![emoji](6542242ed94f97de7fee8107f928ae3e.png)