title: How to apply multiple conditions including Boolean operators to an ifelse statement
body: <p>I need a little help here. I'd like to create a simple code rather than putting in multiple lines of code to get the same result</p>
  <pre><code>Discount &lt;- NewORdersData %&gt;%
       mutate(Discount = ifelse(Coupon == &quot;OFF10&quot; | &quot;LARGE10&quot;, Sub_Total * 0.1, Sub_total * 0.05, Coupon))
  </code></pre>
  <p>i've been getting an error message  - Error in ifelse(Coupon == &quot;OFF10&quot; | &quot;LARGE10&quot;, Sub_Total * 0.1, Sub_total *  :
  unused argument (Coupon)</p>
  <ol>
  <li>id like to create a new column in my data frame (Discount)</li>
  <li>If value in the Coupon Column says OFF10 or LARGE10 - apply a 10% discount which would be(Subtotal *10%)
  if value in the Coupon Column says OFF5 - apply a 5% discount which would be (Sub_Total *10%)</li>
  </ol>
  <pre><code>dput(NewORdersData[1:10, &quot;Coupon&quot;, drop = FALSE])
  structure(list(Coupon = c(&quot;OFF10&quot;, NA, &quot;LARGE10&quot;, &quot;LARGE10&quot;, 
  &quot;LARGE10&quot;, &quot;OFF10&quot;, &quot;LARGE10&quot;, &quot;LARGE10&quot;, NA, &quot;LARGE10&quot;)), row.names = c(NA, 
  10L), class = &quot;data.frame&quot;)
  
  dput(NewORdersData[1:10, &quot;Sub_Total&quot;, drop = FALSE])
  structure(list(Sub_Total = c(27.98, 28.9, 74.94, 91.85, 80.82, 
  37.85, 48.8, 102.8, 12.95, 46.92)), row.names = c(NA, 10L), class = &quot;data.frame&quot;)
  
  </code></pre>