title: How to merge three tables by inserting to each other in R?
body: <p>I have a data frame as following. I want to know the evolution from RIK_T1 to RIK_T2 by seeing their frequency, row% and Column%. How to show them at once?</p>
  
  <pre><code>ID&lt;-c('1','2','3','4','5','6','7','8','9','10')
  RIK_T1&lt;-c('20','15','20','20','97','20','20','20','15','15')
  RIK_T2&lt;-c('20','15','15','20','97','97','20','20','20','20')
  df&lt;-data.frame(ID,RIK_T1,RIK_T2)
  df
  
  TAB=table(df$RIK_T1,df$RIK_T2)
  t1&lt;-addmargins(TAB)                    #TABLE-01
  TAB_row=prop.table(TAB,1)#row
  t2&lt;-round(addmargins(TAB_row),digits=2)#TABLE-01-1
  
  TAB_col=prop.table(TAB,2)#column
  t3&lt;-round(addmargins(TAB_col),digits=2)#TABLE-01-2
  </code></pre>
  
  <p>I get three tables as following:table, row% and col%</p>
  
  <pre><code>    15 20 97 Sum
  15   1  2  0   3
  20   1  4  1   6
  97   0  0  1   1
  Sum  2  6  2  10  
  
        15   20   97  Sum
  15  0.33 0.67 0.00 1.00
  20  0.17 0.67 0.17 1.00
  97  0.00 0.00 1.00 1.00
  Sum 0.50 1.33 1.17 3.00
  
        15   20   97  Sum
  15  0.50 0.33 0.00 0.83
  20  0.50 0.67 0.50 1.67
  97  0.00 0.00 0.50 0.50
  Sum 1.00 1.00 1.00 3.00
  </code></pre>
  
  <p>Is it possible to merge them into one table as following? </p>
  
  <pre><code>       15        20        97        Sum
         R%/C%     R%/C%     R%/C%     R%/C% 
    15   1         2         0         3
         0.33/0.50 0.67/0.33 0.00/0.00 1.00/0.83
    20   1         4         1         6
         0.17/0.50 0.67/0.67 0.17/0.50 1.00/1.67
    97   0         0         1         1
         0.00/0.00 0.00/0.00 1.00/0.50 1.00/0.50
    Sum  2         6         2         10  
         0.50/1.00 1.33/1.00 1.17/1.00 3.00/3.00
  </code></pre>
  
  <p>Thanks in advance.</p>