title: if_else() `false` must be type double, not integer - in R
body: <p>The end of a long string of dplyr pipes is</p>
  
  <p><code>mutate(n = if_else(FiscalYear == "FY2018" &amp; Candy == "SNICKERS", n - 3, n))</code></p>
  
  <p>which gives this error</p>
  
  <pre><code>Error in mutate_impl(.data, dots) : Evaluation error: `false` must be type double, not integer.
  </code></pre>
  
  <p>Which goes away if I do either of these two instead</p>
  
  <p><code>mutate(n = ifelse(FiscalYear == "FY2018" &amp; Candy == "SNICKERS", n - 3, n))</code></p>
  
  <p><code>mutate(n = if_else(FiscalYear == "FY2018" &amp; Candy == "SNICKERS", n - 3L, n))</code></p>
  
  <p>I thought it'd be easiest to make a simple reproducible recreation so I did what you see below, but I can't get the error anymore. Any idea what's going on? <strong>Why does <code>ifelse</code> work where <code>if_else</code> doesn't, and why does <code>if_else</code> work if I change 3 to 3L?</strong> I understand <code>L</code> <em>coerces</em> 3 to be an integer, is that correct?</p>
  
  <pre><code>library(tidyverse)
  df &lt;- tribble(
    ~name, ~fruit, ~qty,
    "Bob", "apple", 10,
    "Bill", "apple", 10
  )
  
  # THIS WORKS AGAIN AS IT SHOULD
  df %&gt;% mutate(qty = ifelse(name == "Bob" &amp; fruit == "apple", qty / 2, qty))
  
  # BUT IF_ELSE DOESN'T FAIL THIS TIME, WEIRD
  df %&gt;% mutate(qty = if_else(name == "Bob" &amp; fruit == "apple", qty / 2, qty))
  </code></pre>