如何渲染R中的wordcloud闪亮?

时间:2015-05-10 09:22:06

标签: r shiny

在浏览topic modelling with lda时,我必须在闪亮的主面板中呈现wordcloud输出,

以下几行定义了我必须渲染的世界云:

i <- 1
cloud.data <- sort(result$topics[i, ], decreasing = TRUE)[1:50]
wordcloud(names(cloud.data), freq = cloud.data, scale = c(4, 0.1), min.freq = 1, 
    rot.per = 0, random.order = FALSE)

我在renderPlot尝试了但是它给了我以下错误..

shiny::runApp('~/RProject/dynamic_UI')

Listening on http://127.0.0.1:3358
Error in if (grepl(tails, words[i])) ht <- ht + ht * 0.2 : 
  argument is of length zero
Warning in run(timeoutMs) : "min.freq" is not a graphical parameter
Warning in run(timeoutMs) : "min.freq" is not a graphical parameter

然后我更正了一些参数(例如min.freqs的{​​{1}}),现在得到以下错误:

min.freq

如何在主面板中呈现shiny::runApp('~/RProject/dynamic_UI') Listening on http://127.0.0.1:3358 Read 8265 items Error in if (grepl(tails, words[i])) ht <- ht + ht * 0.2 : argument is of length zero Warning in run(timeoutMs) : is.na() applied to non-(list or vector) of type 'NULL' 输出?

1 个答案:

答案 0 :(得分:0)

我的专栏名称不匹配:应该是testdoc5 $ word但我有testdoc5 $ doc。现在它有效!