title: Go through dataframe row by row and write to file
body: <p>I am learning R and have a little knowledge in Python.
  I feel that R and Python are in some parts alike, and in others very much unalike.</p>
  
  <p>Especially when iterating or reading data from some file, I get stuck.</p>
  
  <p>I have a data.frame</p>
  
  <pre><code>temp &lt;- 
  A    B    C
  1    2    3
  4    5    6
  7    8    8
  </code></pre>
  
  <p>I simply want to read it out, row by row, and write it to a new file. </p>
  
  <pre><code>#New File
  [1,2,"3"],
  [4,5,"6"],
  [7,8,"9"],
  </code></pre>
  
  <p>I tried this</p>
  
  <pre><code>A &lt;- temp[1]
  B &lt;- temp[2]
  C &lt;- temp[3]
  
  print(paste("[", A, B, as.character(C),  "]", sep = ","))
  </code></pre>
  
  <p>But, that <code>paste</code> does not combine <code>A, B</code> and <code>C</code> correct. It gives me this:</p>
  
  <pre><code>[1,4,"7"],
  [2,5,"8"],
  [3,6,"9"],
  </code></pre>
  
  <p>I tried several other things like </p>
  
  <pre><code>`test &lt;- rbind(temp)` 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>for(i in temp) {
          print(temp[,])
          print(paste("[", temp[,],  "]", sep = ","))
  }
  </code></pre>
  
  <p>and in the end it always comes down to the same thing: It arrays it column by column when I try to print/paste it instead of row by row. </p>
  
  <p>I also fiddled around with <code>array()</code>. It feels like the right function to do this, but passing <code>list</code> as the <code>FUN</code> argument does not seem right...</p>