Plot wordcloud2 in shiny

在使用shiny展示wordcloud2 的云词时,不能再使用传统的plotOutput和renderPlot函数了,应该使用对应的。


wordcloud2OutputrenderWordcloud2函数,如下面介绍的:

Description

Function for plotting wordcloud2 in shiny

Usage

1
2
3
4
5
6
wordcloud2Output(outputId, width = "100%", height = "400px")
renderWordcloud2(expr, env = parent.frame(), quoted = FALSE)

wordcloud2Output(outputId, width = "100%", height = "400px")

renderWordcloud2(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like "100%""400px""auto") or a number, which will be coerced to a string and have "px" appended.

expr

An expression that generates a networkD3 graph

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Details

Use renderWordcloud2 to render an wordcloud2 object and use wordcloud2Output output an wordcloud2 object. See more details in shiny package.

wordcloud2使用方法:

http://blog.csdn.net/sinat_26917383/article/details/51620019

wordcloud2实例:

http://www.th7.cn/web/js/201606/172864.shtml

wordcloud2官方文档:

https://cran.r-project.org/web/packages/wordcloud2/wordcloud2.pdf

猜你喜欢

转载自blog.csdn.net/lichangzai/article/details/52332574