title: Select columns in dplyr conditionally
body: <pre><code>library(nycflights13)
  library(dplyr)
  
  head(flights)
  
  id.vec &lt;- c("a", "b", "c")
  
  for(i in seq_along(id.vec)){
  
    id &lt;- id.vec[i]
  
    temp &lt;- flights %&gt;% dplyr::select(year, day, dep_time, arr_time) %&gt;%
                        dplyr::mutate(year = year - mean(year),
                                      day = day - mean(day),
                                      dep_time = dep_time - mean(dep_time),
                                      arr_time = arr_time - mean(arr_time))
  
    # do some other tasks with temp file
  }
  </code></pre>
  
  <p>My question is how can I put a condition that if <code>id == "c"</code>, then do not 
  select the <code>dep_time</code> column and also do not execute the <code>dep_time = dep_time - mean(dep_time)</code> </p>