title: Can I create a correlation plot using a character variable?
body: <p>My Data set is restaurant Yelp reviews and I would like to see if there is a way to create a correlation plot between words and star ratings using the corrplot package.</p>
  <p>I have created Z below containing the star rating, count of word (n) and word.  I am not sure where to go from here, because I know I can't directly use the word variable in a correlation plot since it is a character not a factor. If I were to just do a correlation between n and stars that doesn't actually give me any useful information. Any thoughts on how I might be able to come up with a correlation between word and stars?</p>
  <pre><code>Z &lt;- ws %&gt;% select(n, stars, word)
  Z
  
  # A tibble: 39,322 x 3
  # Groups:   stars [5]
         n stars word     
     &lt;int&gt; &lt;int&gt; &lt;chr&gt;    
   1  7841     5 food     
   2  6046     4 food     
   3  4027     5 service  
   4  3741     3 food     
   5  3133     1 food     
   6  3046     4 service  
   7  2837     5 delicious
   8  2832     2 food     
   9  2803     5 love     
  10  2785     5 time     
  # … with 39,312 more rows
  </code></pre>