title: Add a new column based on string values in R
body: <p>Consider the dataset :</p>
  
  <pre><code>activity &lt;- c("play football", "basketball player", "guitar sono","cinema", "piano")
  country_and_type &lt;- c("uk", "uk", "spain", "uk", "uk")
  dataset &lt;- data.frame(activity, country_and_type)
  
  |activity         |country_and_type   |
  |play football    |uk                 |
  |basketball playe |uk                 |
  |guitar sono      |spain              |
  |cinema           |uk                 |
  |piano            |uk                 |
  </code></pre>
  
  <p>and these lists:</p>
  
  <pre><code>sport &lt;- ("football", "basketball", "handball", "baseball")
  music &lt;- ("guitar", "piano", "microphone")
  </code></pre>
  
  <p><strong>If the initial dataset$country_and_type value is "uk"</strong>, my goal is to add the name of the lists in parentheses in dataset$country_and_type column based on the string match.
  If there is no value that match, the type should be "other".</p>
  
  <p>To be clearer, here is the expected output:</p>
  
  <pre><code>|activity         |country_and_type   |
  |play football    |uk (sport)         |
  |basketball playe |uk (sport)         |
  |guitar sono      |spain              |
  |cinema           |uk  (other)        |
  |piano            |uk (music)         |
  </code></pre>
  
  <p>Do you have an idea on how to make it?</p>