title: Convert a list of lists to a character vector
body: <p>I have a list of lists of characters. For example:</p>
  
  <pre><code>l &lt;- list(list("A"),list("B"),list("C","D"))
  </code></pre>
  
  <p>So as you can see some elements are lists of length > 1.</p>
  
  <p>I want to convert this list of lists to a character vector, but I'd like the lists with length > 1 to appear as a single element in the character vector.</p>
  
  <p>the <code>unlist</code> function does not achieve that but rather:</p>
  
  <pre><code>&gt; unlist(l)
  [1] "A" "B" "C" "D"
  </code></pre>
  
  <p>Is there anything faster than:</p>
  
  <pre><code>sapply(l,function(x) paste(unlist(x),collapse=""))
  </code></pre>
  
  <p>To get my desired result:</p>
  
  <pre><code>"A"  "B"  "CD"
  </code></pre>