Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rstudio:text [2014/03/01 12:50]
james
rstudio:text [2016/05/13 20:45] (current)
Line 97: Line 97:
 MakeWordCloud(GoodText) MakeWordCloud(GoodText)
 </​code>​ </​code>​
 +{{ :​rstudio:​wordcloud.jpeg?​direct&​300 |}}
  
-{{ :​rstudio:​wordcloud1.jpg?​direct&​300 |Word Cloud}} 
  
-This function has two parameters you can modify The first is color, which should be a specification for a color range. Unlike most plots, we want to have a range of colors instead of just one, so we need to specify the colors different. The default value is "​BuGn",​ but you can see the list by using ''​display.brewer.all()'',​+This function has a few parameters you can modifyThe first is color, which should be a specification for a color range. Unlike most plots, we want to have a range of colors instead of just one, so we need to specify the colors different. The default value is "​BuGn",​ but you can see the list by using ''​display.brewer.all()'',​
 <code r> <code r>
 display.brewer.all(type = "​seq"​) display.brewer.all(type = "​seq"​)
Line 107: Line 107:
 {{ :​rstudio:​displaycolors.jpg?​direct&​300 |Display Colors}} {{ :​rstudio:​displaycolors.jpg?​direct&​300 |Display Colors}}
  
-The other parameter is the same as for the ''​MakeWordBar()'',​ ''​min.freq'',​ which again defaults to only showing words that occurred two or more times.+Another ​parameter is the same as for the ''​MakeWordBar()'',​ ''​min.freq'',​ which again defaults to only showing words that occurred two or more times.
 <code r> <code r>
 MakeWordCloud(GoodText,​ color = "​OrRd",​ min.freq = 10) MakeWordCloud(GoodText,​ color = "​OrRd",​ min.freq = 10)
 </​code>​ </​code>​
  
-{{ :rstudio:wordcloud2.jpg?​direct&​300 |Word Cloud 2}}+{{ :rstudio:wordcloudorrd.jpeg?​direct&​300 |}} 
 + 
 +And just like the MakeWordBar() function, we can specify to display the top 5 (by count) words 
 +<r code> 
 +MakeWordCloud(GoodText,​ top = 5, format = "​count"​) 
 +</​code>​ 
 +{{ :​rstudio:​wordcloud5c.jpeg?​direct&​300 |}} 
 + 
 +or you can display the top 5% of words 
 +<r code> 
 +MakeWordCloud(GoodText,​ top = 5, format = "​count"​) 
 +</​code>​ 
 +{{ :​rstudio:​wordcloud5p.jpeg?​direct&​300 |}}
Print/export