title: How to merge multiple columns into one column?
body: <p>I currently have data spread out across multiple columns in R. I am looking for a way to put this information into the one column as a vector for each of the individual rows.</p>
  
  <p>Is there a function to do this?</p>
  
  <p>For example, the data looks like this:</p>
  
  <pre><code>DF &lt;- data.frame(id=rep(LETTERS, each=1)[1:26], replicate(26, sample(1001, 26)), Class=sample(c("Yes", "No"), 26, TRUE))
  
  select(DF, cols=c("id", "X1","X2", "X23", "Class"))
  </code></pre>
  
  <p>How can I merge the columns "X1","X2", "X23" into a vector containing numeric type variables for each of the IDs?</p>
  
  <p><img src="https://i.stack.imgur.com/5nGr4.png" alt="Data Example"></p>