title: Fastest way to convert data frame to a list of comma-separated strings
body: <p>I have a data frame holding name of municipalities and name of states. It looks like this:</p>
  
  <pre><code> my.df &lt;- structure(list(Location = c("Abatiá", "Adrianópolis", "Agudos do Sul", 
  "Almirante Tamandaré", "Altamira do Paraná", "Altônia"), State = c("PR", 
  "PR", "PR", "PR", "PR", "PR")), .Names = c("Location", "State"
  ), row.names = 0:5, class = "data.frame")
  </code></pre>
  
  <p>What I need to do is to convert this data frame to an array. The expected output would be something like:</p>
  
  <pre><code>my.array$PR
  Abatiá, PR
  Adrianópolis, PR
  Agudos do Sul, PR
  ...
  
  my.array$RS
  Vitória das Missões, RS
  Westfalia, RS
  Xangri-lá, RS
  ...
  </code></pre>
  
  <p>and so on.</p>
  
  <p>How can I get there?</p>
  
  <p>My actual data set has about 10k rows, so a fast solution would perhaps be desirable over legibility. Thanks!</p>