title: Circular shift of vector by distance n
body: <p>Say I have</p>
  
  <pre><code>a &lt;- c(1, 2, 3)
  </code></pre>
  
  <p>and I want b to be derived from a by shifting it in direction "left" by distance 1</p>
  
  <pre><code>b
  # [1] 2 3 1
  </code></pre>
  
  <p>By derivation I mean you either:</p>
  
  <ol>
  <li>Pass "a" into a function that spits out "b"</li>
  <li>You use some sort of indexing short had which does that.</li>
  <li><code>b &lt;- c(2, 3, 1)</code>, for example, is not a solution I'm looking for</li>
  </ol>
  
  <p>What would be elegant/efficient ways to do that?</p>