Home > other >  R | custom word cloud can't display
R | custom word cloud can't display

Time:12-09

I don't know why the custom word cloud still not figure

This is the word and word frequency
The following is the statement
 
The worker () - & gt; Wk
aFristmone % & gt; %
Mutate (words=map (fristmone [3], segment, jieba=wk) a) % & gt; %
Select (words) - & gt; Corpus
Fristmone % & gt; %
Mutate (words=map (fristmone [7], segment, jieba=wk) a) % & gt; %
Select (words) - & gt; Corpu
Corpus<- rbind (corpus, corpu)
Corpus % & gt; %
Mutate (id=1: n ()) - & gt; Corpus
Corpus % & gt; %
Unnest (words) % & gt; %
Count (id, words) - & gt; F_table
F_table % & gt; %
Bind_tf_idf (term=words, the document=id, n=n) - & gt; Tf_idf_table
Tf_idf_table & lt; - SQLDF (' select * from tf_idf_table where length (words) & gt; 1 ')
Tf_idf_table % & gt; %
Group_by (id) % & gt; %
, tf_idf top_n (2) % & gt; %
Ungroup () - & gt; Top3
P_load (wordcloud2)

Top3 % & gt; %
Count (words) % & gt; %
Top_n (100) % & gt; %
Ungroup () - & gt; Top3
# to display only the 100 keywords appear most times
Top3 & lt; - the as. The data frame (top3)
LetterCloud (data=https://bbs.csdn.net/topics/top3, word="blibli", size=3, backgroundColor="white")


  • Related