【发布时间】:2020-04-14 00:26:23
【问题描述】:
我通过导入两个不同的数据集在 Rmarkdown 中成功创建了两个 wordcloud,但是一个 wordcloud 在我将其编织到 html 后没有显示出来。有人知道怎么解决吗?
输出:html_document
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE)
library(wordcloud2)
library(here)
library(rio)
词云 1
s1 <- import(here("data", "set1.xlsx"))
wordcloud2(s1, color = "random-light", backgroundColor = "dark")
词云 2
s2 <- import(here("data", "set2.xlsx"))
wordcloud2(s2, color = "random-light", backgroundColor = "dark")
【问题讨论】:
-
没有数据无法回答
-
您能否提供一个带有示例数据的可重现示例?
-
@awchisholm 感谢您指出这一点。我在github.com/hshung/WordCloud_trial.git 创建了一个示例仓库
-
请提供一个最小的自包含示例。如果重现问题的工作不需要克隆外部 git 存储库或手动下载数据,您将更有可能得到答案。
标签: r r-markdown word-cloud wordcloud2