title: Create a list with named values by applying a function to each row of a data frame
body: <p>I'm trying to get a list where each element has a name, by applying a function to each row of a data frame, but can't get the right output.</p>
  
  <p>Assuming this is the function that I want to apply to each row:</p>
  
  <pre><code>format_setup_name &lt;- function(m, v, s) {
   a &lt;- list()
   a[[paste(m, "machines and", v, s, "GB volumes")]] &lt;- paste(num_machines,num_volumes,vol_size,sep="-")
   a
  }
  </code></pre>
  
  <p>If this is the input data frame:</p>
  
  <pre><code>df &lt;- data.frame(m=c(1,2,3), v=c(3,3,3), s=c(15,20,30))
  </code></pre>
  
  <p>I can't get a list that looks like:</p>
  
  <pre><code>$`1-3-15`
  [1] "1 machines and 3 15 GB volumes"
  
  $`2-3-20`
  [1] "2 machines and 3 20 GB volumes"
  
  $`3-3-30`
  [1] "3 machines and 3 30 GB volumes"
  </code></pre>
  
  <p>Can someone give me hints how to do it?</p>
  
  <p>Why do I need this? Well, I want to populate <code>selectizeInput</code> in shiny using values coming from the database. Since I'm combining several columns, I need a way to match the selected input with the values.</p>