title: Issue with case_when statement using & in dplyr?
body: <p>I am attempting to create an additional column in my dataset that bucketizes percentiles. Ideally I would to create logic as follows:</p>
  <pre><code>CASE 
    WHEN  percentile &gt;=  75 AND  percentile &lt; 90  THEN &quot;75%-89% Percentile&quot;
    WHEN percentile &gt;=  50 AND  percentile &lt; 75  THEN &quot;50%-75% Percentile&quot;
  
  END 
  </code></pre>
  <p>What I have attempted dplyr is the following:</p>
  <pre><code>  mutate(Bucket = case_when(as.double(percentile) &gt;= 90 ~ &quot;90%-100% Percentile&quot;,
                              as.double(percentile) &gt;=  75 &amp; as.double(percentile) &lt; 90  ~ &quot;75%-89% Percentile&quot;,
                              as.double(percentile) &lt;  75 &amp; as.double(percentile) &gt;= 50  ~ &quot;50%-75% Percentile&quot;,
                              as.double(percentile) &lt;  50 &amp; as.double(percentile) &gt;= 25  ~ &quot;25%-50% Percentile&quot;,
                              as.double(percentile) &lt;  25 &amp; as.double(percentile) &gt;= 0  ~ &quot;0%-25% Percentile&quot;))
  </code></pre>
  <p>However it is not bucketizing correctly, see a sample of the results in the screenshot. The bucket flag for these percentiles should be &quot;75%-89% Percentile&quot; :</p>
  <p><a href="https://i.stack.imgur.com/MfAXd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MfAXd.png" alt="enter image description here" /></a></p>