title: Set certain values to NA with dplyr
body: <p>I'm trying to figure out a simple way to do something like this with dplyr (data set = dat, variable = x):</p>
  
  <pre><code>day$x[dat$x&lt;0]=NA
  </code></pre>
  
  <p>Should be simple but this is the best I can do at the moment.  Is there an easier way?</p>
  
  <pre><code>dat =  dat %&gt;% mutate(x=ifelse(x&lt;0,NA,x))
  </code></pre>