title: creating a new column based on a set of strings conditions
body: <p>I have this column with a lot of countries.</p>
  <p><code>countries &lt;- c(Germany, France, Japan, China, Angola, Nigeria)</code></p>
  <p>I want to create a new column called continent, agreggating these places. For example, I tried this but it didn't work:</p>
  <pre><code>if (countries == &quot;Germany&quot; | &quot;France&quot; {
     countries$continents &lt;- &quot;Europe&quot;
   } else if (countries == &quot;Japan&quot;  |&quot;China&quot;) {
     countries$continents &lt;- &quot;Asia&quot;
   } else if (countries == &quot;Angola&quot;  |&quot;Nigeria&quot;) {
     countries$continents &lt;- &quot;África&quot; 
  </code></pre>
  <p>But R keep saying me i'm not allowed to compare strings.
  Maybe dplyr might have a clever solution, but any solution is welcomed. How I do this?</p>