[英]R Eclipse StatET - Creating wordcloud gets overlapped words
我正在嘗試在Eclipse中使用R創建wordcloud。 我使用R已有數周沒有任何問題,並且創建了許多不同的圖,但是當創建wordcloud,任何形式的單詞並使用不同的配置時,我總是得到所有單詞都重疊的wordcloud。
我遵循了不同的示例,並且總是使單詞重疊。 例如,如果我執行以下代碼:
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)
我得到這個結果:
如您所見,所有單詞都是重疊的,我不知道該怎么辦。 我在互聯網上搜索了很多東西,但沒有任何線索。
wordcloud
軟件包中的參數包括:
“ use.r.layout
如果為false,則將c ++代碼用於碰撞檢測,否則使用R” -Wordcloud軟件包的文檔。
Eclipse和R vs. C ++的使用可能會有些困難。 由於我不確定Wordcloud
的默認值, Wordcloud
嘗試在TRUE
和FALSE
之間切換參數。
例如, Wordcloud("Corpus",use.r.layout=TRUE,colors=brewer.pal(6,"Dark2"),random.order=FALSE)
添加命令后出現此問題
Sys.setlocale('LC_ALL','C')
禁用此指令可使wordclouds再次正常工作。 我正在將Jupyter Notebook與R內核一起使用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.