title: Shifting a data frame in R
body: <p>i have a data frame like this</p>
  
  <pre><code>A B value
  1 1 0.123
  2 1 0.213
  3 1 0.543
  1 2 0.313
  2 2 0.123
  3 2 0.412
  </code></pre>
  
  <p>what i want to do is to create a function that shift this data frame by a value. for example:</p>
  
  <p>if the value of shifting is 1 the data frame will become:</p>
  
  <pre><code>A B value
  3 2 0.412
  1 1 0.123
  2 1 0.213
  3 1 0.543
  1 2 0.313
  2 2 0.123
  </code></pre>
  
  <p>etc...</p>
  
  <p>the function should be like this.</p>
  
  <pre><code>shift&lt;-function(dataframe,shiftvalue)
  </code></pre>
  
  <p>is there any simple way to do this in R without entering in a lot of loops??</p>