title: Filtering by column in R
body: <p>I have trouble filtering by <code>skin_color</code> that contains the word &quot;green&quot; in the Star Wars API.
  Also Im grouping it by unique <code>hair_color</code>
  For now i have:</p>
  <pre><code>library(dplyr)
  sw&lt;-starwars
  sw %&gt;%
    filter(skin_color==&quot;green&quot;)%&gt;%
      group_by(hair_color) %&gt;%
          count(hair_color) %&gt;%
            setNames(c(&quot;Color&quot;,&quot;Count&quot;))-&gt; swG
  </code></pre>
  <p>I am sure it has to do something with regex, but i can't figure it out.</p>