title: Subtract data using id in 1 column
body: <p>I have 3 data set. All of them has 1 column called <code>ID</code>. I would like to list out each <code>ID</code> for whole 3 tables (I'm not sure I'm explaining right). For example</p>
  
  <p><code>df1</code></p>
  
  <pre><code>ID  age
  1   34
  2   33
  5   34
  7   35
  43  32
  76  33
  </code></pre>
  
  <p><code>df2</code></p>
  
  <pre><code>ID  height
  1   178
  2   176
  5   166
  7   159
  43  180
  76  178
  </code></pre>
  
  <p><code>df3</code></p>
  
  <pre><code>ID  class   type
  1   a   1
  2   b   1
  5   a   2
  7   b   3
  43  b   2
  76  a   3
  </code></pre>
  
  <p>I would like to have an output which looks like this</p>
  
  <pre><code>ID = 1      
  
  df1 age 
      34  
  df2 height  
      178 
  df3 class   type
      a   1
  
  ID = 2      
  
  df1 age 
      33  
  df2 height  
      176 
  df3 class   type
      b   1
  </code></pre>
  
  <p>I wrote a script</p>
  
  <pre><code>listing &lt;- function(x) {
    for(i in 1:n) {
       data &lt;- print(x[x$ID == 'i', ])
        print(data)
    }
    return(data)
  }   
  </code></pre>
  
  <p>why am I not getting the output I wanted?</p>