title: Convert character vector to a single string with line breaks, save as an object in R
body: <p>I am trying to use R to take the contents of a character vector and create a single string with line breaks between the items. The ultimate goal is to import the text into an excel file, such that one cell contains all of the items, each one on a separate line.</p>
  
  <pre><code>TextVector &lt;- c("Name1", "Name2", "Name3")
  cat(paste(TextVector, collapse = '\n'))
  </code></pre>
  
  <p>This gives the output I want, but it's only printed...I cannot save it to an object. In the end, I want a csv file that will have the items contained in one cell with line breaks, that will appear like this:<br>
  Name1<br>
  Name2<br>
  Name3</p>
  
  <p>Thank you for any suggestions!</p>