title: Use of EXCEL OFFSET IN R for a range of values and multiple times
body: <p>This is file I want to append my data in</p>
  
  <pre><code>Collection A
  Jan
  Feb
  March
  April
  
  Collection B
  Jan
  Feb
  March
  April
  
  Revenue A
  Jan
  Feb
  March
  April
  
  Revenue B
  Jan
  Feb
  March
  April
  
  </code></pre>
  
  <p>The file I want to pull my data from looks like this:</p>
  
  <pre><code>Collection    Month      Collection A    Collection B Revenue Month Revenue A   Revenue B
  Collection  January     1                 5         Revenue  January    4    8
  Collection  February    2                 6         Revenue  February   3    7
  Collection  March       3                 7         Revenue  March      2    6
  Collection  April       4                 8         Revenue  April      1    5
  </code></pre>
  
  <p>I want the final output to look like this:</p>
  
  <pre><code>Collection A
  Jan           1
  Feb           2
  March         3         
  April         4
  
  Collection B
  Jan          5
  Feb          6
  March        7
  April        8
  
  Revenue A
  Jan         4
  Feb         3
  March       2 
  April       1
  
  Revenue B
  Jan         8
  Feb         7
  March       6
  April       5
  </code></pre>
  
  <p>I am able to run this on excel using OFFSET and INDIRECT function. But I want to automate it better for future purposes so I am trying it on R. </p>
  
  <p>I am really stuck on how to combine the two datasets to find the desired output. It seems like an impossible task for me. I have played around with several functions like select, subset and arrange by none of them have helped me progress. </p>
  
  <p>I will be glad if someone can help me out with this.</p>