title: Why is this expression inside a for-loop acting weird in R?
body: <p>I'm running a for loop with i from 3 to 21. And I'm printing 5 values of 'i' using its index:</p>
  
  <pre><code>for (i in 3:21 )
  { 
    print(i)
    print(i-2 : i+2)
  
  }
  </code></pre>
  
  <p>The actual output is:</p>
  
  <pre><code>[1] 3
  [1] 3 2
  [1] 4
  [1] 4 3 2
  [1] 5
  [1] 5 4 3 2
  [1] 6
  [1] 6 5 4 3 2
  [1] 7
  [1] 7 6 5 4 3 2
  [1] 8
  [1] 8 7 6 5 4 3 2 and etc
  </code></pre>
  
  <p>But I was expecting:</p>
  
  <pre><code>3
  1 2 3 4 5
  4
  4 5 6 7 8 
  5
  5 6 7 8 9 
  6
  6 7 8 9 10 and etc
  </code></pre>
  
  <p>I guess I'm not using the index properly.. Where did I go wrong??</p>