gpt4 book ai didi

r - 在Shiny-Server中发布后如何在Rmarkdown中启用表情符号以显示

转载 作者:行者123 更新时间:2023-12-04 08:40:57 25 4
gpt4 key购买 nike

我有以下Rmarkdown代码,该代码使用Hadley的 emo(ji) 软件包。

---
title: "My First Shiny"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: scroll
---


```{r setup, include=FALSE}
```


Rows {data-height=800}
-----------------------------------------------------------------------

### Section1 `r strrep(emo::ji("heart_eyes_cat"), 5)`

Some text

在我的Rstudio IDE中,生成此文件没有问题:

enter image description here

由于图像中的表情符号太高,因此表情符号无法显示在我的 local Shiny-server.

如何启用它?

最佳答案

根据github documentation,您的文件应读取以下内容:

S3method(print,emoji)
export(ji)
export(ji_find)
export(ji_p)


ji_p <- function(x) {
stopifnot(is.numeric(x))

out <- stats::symnum(x,
corr = FALSE,
na = FALSE,
cutpoints = c(0, 1e-5, 0.001, 0.01, 0.05, 0.1, 1),
symbols = c(ji("laughing"), ji("joy"), ji("grin"), ji("smile"), ji("thinking"), ji("poop"))
)

structure(out, class = c("emoji", class(out)))

}

我没有看到任何简写形式,因为您似乎已经在代码中使用了(使用 , 5),并且 r前缀现在似乎已被删除;内联使用时,可以使用它,但是需要在其前后使用额外的“滴答”,如下所示:
 `` `r emo::ji("smile")` ``

您使用的是较早版本的提交吗?不再需要编织物,现在只需要点缀即可。检查 this latest commit doc out

我希望这会有所帮助

关于r - 在Shiny-Server中发布后如何在Rmarkdown中启用表情符号以显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44943215/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com