[英]R Eclipse StatET - Creating wordcloud gets overlapped words
I'm trying to create a wordcloud using R in Eclipse. 我正在尝试在Eclipse中使用R创建wordcloud。 I've been working with R for some weeks without any problem and I´ve created lots of different plots, but when creating the wordcloud, any kind of them and using different configurations, I always get the wordcloud with all the words overlapped.
我使用R已有数周没有任何问题,并且创建了许多不同的图,但是当创建wordcloud,任何形式的单词并使用不同的配置时,我总是得到所有单词都重叠的wordcloud。
I've followed different examples and I always get the words overlapped. 我遵循了不同的示例,并且总是使单词重叠。 For example, if I execute this code:
例如,如果我执行以下代码:
library(wordcloud)
library(tm)
wordcloud("May our children and our children's children to a
thousand generations, continue to enjoy the benefits conferred
upon us by a united country, and have cause yet to rejoice under
those glorious institutions bequeathed us by Washington and his
compeers.",colors=brewer.pal(6,"Dark2"),random.order=FALSE)
I get this result: 我得到这个结果:
As you can see, all the words are overlapped and I don´t know what to do. 如您所见,所有单词都是重叠的,我不知道该怎么办。 I've search a lot on the Internet and I didn't get any clue.
我在互联网上搜索了很多东西,但没有任何线索。
The arguments within the wordcloud
package includes: wordcloud
软件包中的参数包括:
" use.r.layout
- if false, then c++ code is used for collision detection, otherwise R is used" -Documentation for Wordcloud package. “
use.r.layout
如果为false,则将c ++代码用于碰撞检测,否则使用R” -Wordcloud软件包的文档。
There may be some difficulty with Eclipse and the usage of R vs. C++. Eclipse和R vs. C ++的使用可能会有些困难。 As I am unsure as to the default of
Wordcloud
try toggling the argument between TRUE
and FALSE
. 由于我不确定
Wordcloud
的默认值, Wordcloud
尝试在TRUE
和FALSE
之间切换参数。
eg Wordcloud("Corpus",use.r.layout=TRUE,colors=brewer.pal(6,"Dark2"),random.order=FALSE)
例如,
Wordcloud("Corpus",use.r.layout=TRUE,colors=brewer.pal(6,"Dark2"),random.order=FALSE)
I got this problem after adding the command 添加命令后出现此问题
Sys.setlocale('LC_ALL','C')
Disabling this directive made wordclouds work fine again. 禁用此指令可使wordclouds再次正常工作。 I am using Jupyter Notebook with R kernel
我正在将Jupyter Notebook与R内核一起使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.