不写R包的分析师不是好全栈

wordcloud2

    R

写了一个wordcloud2的R包,调用一个JS的库实现wordcloud.

knitr和shiny也全支持…以下是一个基本介绍

(后期会加一些需要更新的功能比如图片Mask,颜色个性化,交互式展示数据.完全取决于该项目star的程度…)

wordcloud2

R interface to wordcloud for data visualization.
Timdream’s wordcloud2.js is used in this package. Github is here

Installation

1
devtools::install_github("lchiffon/wordcloud2")

knitr and shiny is support in wordcloud2 package.

Example

1
2
library(wordcloud2)
wordcloud2(demoFreq, size = 1,shape = 'star')

1

1
wordcloud2(demoFreq, size = 2, minRotation = -pi/2, maxRotation = -pi/2)

1

1
2
wordcloud2(demoFreq, size = 2, minRotation = -pi/6, maxRotation = -pi/6,
rotateRatio = 1)

1

Chinese version

1
2
wordcloud2(demoFreqC, size = 2, fontFamily = "微软雅黑",
color = "random-light", backgroundColor = "grey")

1

page PV:  ・  site PV:  ・  site UV: