title: R - use dplyr to filter each column based on each column's quantiles
body: <p>Given a data frame, I'd like to use to filter each column, using the quantiles of each column. I would prefer to use dplyr/tidyverse to accomplish this.</p>
  
  <pre><code>set.seed(23)
  df &lt;- data.frame(
    x1 = runif(10, 0, 100),
    x2 = runif(10, 0, 100),
    x3 = runif(10, 0, 100)
  )
  df
  &gt; df
           x1       x2       x3
  1  57.66037 86.59590 58.63978
  2  22.30729 70.14217 27.47410
  3  33.18966 39.04731 14.76570
  4  71.07246 31.47697 80.14103
  5  81.94490 84.59473 38.64098
  6  42.37206 13.92785 82.04507
  7  96.35445 51.81206 68.49373
  8  97.81304 59.35508 88.33893
  9  84.05219 94.24617 11.19208
  10 99.66112 62.80196 77.88340
  
  &gt; quantile(df$x1, .95)
       95% 
  98.82949 
  &gt; quantile(df$x2, .95)
       95% 
  90.80355 
  </code></pre>
  
  <p>My desired result would then be either of 1. a data frame in long format with anything above the percentiles set to NA or removed completely or 2. a wide data frame with anything above the percentiles set to NA.</p>