title: How to iterate across two different margins of dataframe/matrix/array?
body: <p>I have a two dimensional object (numeric), and am trying to create the following output, for use in a table (format for markdown). 
  the current object is only 7x7, so Ive done it manually, but anticipate larger objects in the future and want to figure out the correct way of doing it. </p>
  
  <p>I would like to iterate the columns while keeping row constant, then iterate the row object by one and continue the process.</p>
  
  <p>I tried writing various functions and passing multiple arguments, in conjunction with <code>apply</code> but was unable to figure out margins/patterns. </p>
  
  <pre><code>paste(dalym[1,1], "|", dalym[1,2], " (", dalym[1,3], ")|", dalym[1,4], " (", dalym[1,5], ")|", dalym[1,6], " (", dalym[1,7], ")|", dalyp[1,],"%", sep="")
  paste(dalym[2,1], "|", dalym[2,2], " (", dalym[2,3], ")|", dalym[2,4], " (", dalym[2,5], ")|", dalym[2,6], " (", dalym[2,7], ")|", dalyp[2,],"%", sep="")
  paste(dalym[3,1], "|", dalym[3,2], " (", dalym[3,3], ")|", dalym[3,4], " (", dalym[3,5], ")|", dalym[3,6], " (", dalym[3,7], ")|", dalyp[3,],"%", sep="")
  paste(dalym[4,1], "|", dalym[4,2], " (", dalym[4,3], ")|", dalym[4,4], " (", dalym[4,5], ")|", dalym[4,6], " (", dalym[4,7], ")|", dalyp[4,],"%", sep="")
  paste(dalym[5,1], "|", dalym[5,2], " (", dalym[5,3], ")|", dalym[5,4], " (", dalym[5,5], ")|", dalym[5,6], " (", dalym[5,7], ")|", dalyp[5,],"%", sep="")
  paste(dalym[6,1], "|", dalym[6,2], " (", dalym[6,3], ")|", dalym[6,4], " (", dalym[6,5], ")|", dalym[6,6], " (", dalym[6,7], ")|", dalyp[6,],"%", sep="")
  paste(dalym[7,1], "|", dalym[7,2], " (", dalym[7,3], ")|", dalym[7,4], " (", dalym[7,5], ")|", dalym[7,6], " (", dalym[7,7], ")|", dalyp[7,],"%", sep="")
  </code></pre>