title: Extracting outputs from lapply to a dataframe
body: <p>I have some R code which performs some data extraction operation on all files in the current directory, using the following code:</p>
  
  <pre><code>files &lt;- list.files(".", pattern="*.tts")
  results &lt;- lapply(files, data_for_time, "17/06/2006 12:00:00")
  </code></pre>
  
  <p>The output from lapply is the following (extracted using <code>dput()</code>) - basically a list full of vectors:</p>
  
  <pre><code>list(c("amer", "14.5"), c("appl", "14.2"), c("brec", "13.1"), 
  c("camb", "13.5"), c("camo", "30.1"), c("cari", "13.8"), 
  c("chio", "21.1"), c("dung", "9.4"), c("east", "11.8"), c("exmo", 
  "12.1"), c("farb", "14.7"), c("hard", "15.6"), c("herm", 
  "24.3"), c("hero", "13.3"), c("hert", "11.8"), c("hung", 
  "26"), c("lizr", "14"), c("maid", "30.4"), c("mart", "8.8"
  ), c("newb", "14.7"), c("newl", "14.3"), c("oxfr", "13.9"
  ), c("padt", "10.3"), c("pbil", "13.6"), c("pmtg", "11.1"
  ), c("pmth", "11.7"), c("pool", "14.6"), c("prae", "11.9"
  ), c("ral2", "12.2"), c("sano", "15.3"), c("scil", "36.2"
  ), c("sham", "12.9"), c("stra", "30.9"), c("stro", "14.7"
  ), c("taut", "13.7"), c("tedd", "22.3"), c("wari", "12.7"
  ), c("weiw", "13.6"), c("weyb", "8.4"))
  </code></pre>
  
  <p>However, I would like to then deal with this output as a dataframe with two columns: one for the alphabetic code (<code>"amer"</code>, <code>"appl"</code> etc) and one for the number (<code>14.5</code>, <code>14.2</code> etc).</p>
  
  <p>Unfortunately, <code>as.data.frame</code> doesn't seem to work with this input of nested vectors inside a list. How should I go about converting this? Do I need to change the way that my function <code>data_for_time</code> returns its values? At the moment it just returns <code>c(name, value)</code>. Or is there a nice way to convert from this sort of output to a dataframe?</p>