Plot wordcloud2 in shiny

来源:互联网 发布:最新全国省市区数据库 编辑:程序博客网 时间:2024/06/16 11:18

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


wordcloud2OutputrenderWordcloud2函数,如下面介绍的:

Description

Function for plotting wordcloud2 in shiny

Usage

123456
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

0 0
原创粉丝点击