title: Recreate lists (ballots) from counted results
body: <p>I am at a loss, I feel as if I am finding the answer... but I have been unable to do so. I really don't know where to start</p>
  
  <p>I have the results from ranked voting:
  It shows how many votes (100 voters) each candidate (5 candidates) got for each place (reproducible data is at the bottom):</p>
  
  <pre><code>Name 1st 2nd 3rd 4th 5th
  Can1  50   0  15  25  10
  Can2  15  25   0  10  50
  Can3  25  50  10   0  15
  Can4   0  10  50  15  25
  Can5  10  15   0   0   0
  </code></pre>
  
  <p>I am trying to recreate ballots from the results, 100 ballots like this (also, some ballots have not been filled completely):</p>
  
  <pre><code>Ballot1:   Can1, Can3, Can4, Can5, Can2
  Ballot2:   Can1, Can3, Can5
  Ballot3:   Can3, Can5, Can2, Can1, Can4 
  ...
  Ballot100: Can2, Can5, Can1, Can4
  </code></pre>
  
  <p>I need to do this with 60 candidates and more than 1000 votes.</p>
  
  <hr>
  
  <pre><code>voting.results &lt;- structure(list(X1 = c("Can1", "Can2", "Can3", "Can4", "Can5"), 
  `1place` = c(50L, 15L, 25L, 0L, 10L), `2place` = c(0L, 25L, 
  50L, 10L, 15L), `3place` = c(15L, 0L, 10L, 50L, 0L), `4place` = c(25L, 
  10L, 0L, 15L, 0L), `5place` = c(10L, 50L, 15L, 25L, 0L)), .Names = c("X1", 
  "1place", "2place", "3place", "4place", "5place"), class = "data.frame", row.names = c(NA, 
  -5L), spec = structure(list(cols = structure(list(X1 = structure(list(), class = c("collector_character", 
  "collector")), `1place` = structure(list(), class = c("collector_integer", 
  "collector")), `2place` = structure(list(), class = c("collector_integer", 
  "collector")), `3place` = structure(list(), class = c("collector_integer", 
  "collector")), `4place` = structure(list(), class = c("collector_integer", 
  "collector")), `5place` = structure(list(), class = c("collector_integer", 
  "collector"))), .Names = c("X1", "1place", "2place", "3place", 
  "4place", "5place")), default = structure(list(), class = c("collector_guess", 
  "collector"))), .Names = c("cols", "default"), class = "col_spec"))
  </code></pre>