title: Detect string with multiple conditions and mutate column in r
body: <p>I have Lookup_DF which contains dictionary to refer strings and Raw_file which has combination of strings, Lookup_DF is having Types to populate in Result data frame based on Items in raw files.</p>
  <pre><code>Item1=c(&quot;Banana&quot;,&quot;Toamto&quot;,&quot;Potato&quot;,&quot;Palak&quot;)
  Item2=c(&quot;&quot;,&quot;Orange&quot;,&quot;Onion&quot;,&quot;Mango&quot;)
  Type1=c(&quot;Fruit&quot;,&quot;Vegetable&quot;,&quot;Vegetable&quot;,&quot;Leaves&quot;)
  Type2=c(&quot;&quot;,&quot;Fruit&quot;,&quot;Vegetable&quot;,&quot;Fruit&quot;)
  
  DF1=data.frame(Item1,Item2,Type1,Type2)
  
  Items=c(&quot;Onion,Potato,Ginger&quot;,&quot;Tomato&quot;,&quot;Banana&quot;,&quot;Palak,Mango&quot;,&quot;Onion,Capsicum&quot;,&quot;Orange,Sweet_potato&quot;)
  
  Raw_file=data.frame(Items)
  
  Result_Type1=c(&quot;Vegetable&quot;,&quot;Vegetable&quot;,&quot;Fruit&quot;,&quot;Leaves&quot;,&quot;&quot;,&quot;&quot;)
  Result_Type2=c(&quot;Vegetable&quot;,&quot;&quot;,&quot;&quot;,&quot;Fruit&quot;,&quot;Vegetable&quot;,&quot;Fruit&quot;)
  Result=data.frame(Items,Result_Type1,Result_Type2)
  </code></pre>
  <p>My Output data frame would look like Result.
  I tried something with str_detect in case statement but not able to get it. Can someone help me out on this.</p>