title: Apply paste over a list of vectors to get a list of strings
body: <p>This seems so simple but no matter which *apply function I use, the correct answer eludes me. I haven't tried any other package because it seems *apply should definitely be able to do this.</p>
  
  <p>My data:</p>
  
  <pre><code>data = list(foo=c("first", "m", "last"), bar=c("first", "m", "last"))
  </code></pre>
  
  <p>What I really think should work:</p>
  
  <pre><code>lapply(data, FUN=paste)
  </code></pre>
  
  <p>But it gives me:</p>
  
  <pre><code>$foo
  [1] "first" "m"     "last" 
  
  $bar
  [1] "first" "m"     "last" 
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>$foo
  [1] "first m last"
  $bar
  [1] "first m last"
  </code></pre>
  
  <p>Of course I've tried a whole slew of other stuff:</p>
  
  <pre><code>&gt; paste(data)
  [1] "c(\"first\", \"m\", \"last\")" "c(\"first\", \"m\", \"last\")"
  &gt; paste(data, collapse = "")
  [1] "c(\"first\", \"m\", \"last\")c(\"first\", \"m\", \"last\")"
  &gt; paste(data, sep = "")
  [1] "c(\"first\", \"m\", \"last\")" "c(\"first\", \"m\", \"last\")"
  &gt; paste(data, collapse = "", sep="")
  [1] "c(\"first\", \"m\", \"last\")c(\"first\", \"m\", \"last\")"
  &gt; paste(as.vector(data), collapse = "", sep="")
  [1] "c(\"first\", \"m\", \"last\")c(\"first\", \"m\", \"last\")"
  &gt; paste(c(data), collapse = "", sep="")
  [1] "c(\"first\", \"m\", \"last\")c(\"first\", \"m\", \"last\")"
  &gt; paste(c(data, recursive = T), collapse = "", sep="")
  [1] "firstmlastfirstmlast"
  </code></pre>
  
  <p>I don't understand where this quoted "c" nonsense is coming from.</p>