title: Create descending ranks for a set of columns using dplyr
body: <p>How do you use <code>dplyr</code> to create ranks for each column based on descending values for multiple columns?
  The code below seemingly does not consider the <code>desc</code> parameter in the <code>arrange_at</code></p>
  
  <pre><code>rank_f &lt;- function(ds, cols, fs){
            ds %&gt;%arrange_at(desc(vars(!!!cols)))%&gt;%
              mutate_at(vars(!!!cols), funs(!!!fs))
          }
  
  
  USArrests %&gt;%tibble::rownames_to_column()%&gt;%
       rank_f(quos((Murder:Rape)),quos(min_rank))-&gt;ranked
  
  
  head(USArrests) 
  #              Murder Assault UrbanPop Rape
  # Alabama      13.2     236       58 21.2
  # Alaska       10.0     263       48 44.5
  # Arizona       8.1     294       80 31.0
  # Arkansas      8.8     190       50 19.5
  # California    9.0     276       91 40.6
  # Colorado      7.9     204       78 38.7
  
  head(ranked)
  #        rowname Murder Assault UrbanPop Rape
  # 1    Alabama     44      35       16   29
  # 2     Alaska     35      43        7   49
  # 3    Arizona     29      47       39   43
  # 4   Arkansas     31      31        9   24
  # 5 California     32      44       50   48
  # 6   Colorado     28      33       38   47
  </code></pre>
  
  <p>The higher the rate, the lower the rank should be, which is not the case.</p>