title: Using Paste to collapse a vector in R
body: <p>I have a data frame <code>mynames</code> of a single column that i wish to convert to a character string. The aim being to select the names of columns in another dataset based on the items in this string. An example of the data is below</p>
  
  <pre><code>X
  A
  B
  C
  </code></pre>
  
  <p>I tried using the code below to paste it all together using the following code</p>
  
  <pre><code>paste(mynames, sep="", collapse="")
  </code></pre>
  
  <p>However that produces the out put below which is far from ideal</p>
  
  <p>"c(\"A\", \"B\", \"C\",..........</p>
  
  <p>Can anyone help?</p>