title: Concatenating Rows or columns of a dataframe
body: <p>Working with R:</p>
  
  <p>I took multiple strings of letters:   </p>
  
  <pre><code>Orig1 - ABCDE
  
  Orig2 - FGHIJ
  
  Orig3 - KLMNO
  </code></pre>
  
  <p>I split those strings of letters using <code>strsplit</code>:  </p>
  
  <pre><code>Orig1 - A B C D E
  
  Orig2 - F G H I J
  
  Orig3 - K L M N O
  </code></pre>
  
  <p>And I put each letter in its own row and column in a dataframe. Each string on its own row with each subsequent letter in its own column:  </p>
  
  <pre><code>RowName   V1 V2 V3 V4 V5
  
  Orig1     A  B  C  D  E
  
  Orig2     F  G  H  I  J
  
  Orig3     K  L  M  N  O
  </code></pre>
  
  <p>I manipulated these strings of letters to come up with a multiple altered strings based on various analyses of these strings of letters:  </p>
  
  <pre><code>RowName   V1 V2 V3 V4 V5
  
  Altered1  A  G  H  N  E
  
  Altered2  F  B  C  I  O
  
  Altered3  K  L  M  D  J
  </code></pre>
  
  <p>I can't figure out how to collapse the altered strings back out of the dataframe.  I need this to be able to be converted into an exportable .fasta file with the rownames as the subsequent sequence names.</p>
  
  <p>Paste didn't work within the dataframe, so I tried using a bit of code from another thread on a similar subject:</p>
  
  <pre><code>ldf = lapply(as.list(1:dim(df)[1]), function(x) df[x[1],])
  </code></pre>
  
  <p>this put each into its own list, which I could then use paste on, but I found the output baffling to try to export. </p>
  
  <p>Any help would be appreciated.  </p>