title: For loop issue with a negative values in R
body: <p>I am new to R and I have an R  code that uses the <code>for</code> loop to calculate the y = m*i + b. The starting value is a negative and I want to use that in my calculation and store it in the first occurrence of the <code>Trend.Line</code> and so forth. </p>
  
  <p>I am not getting the results that I'm expecting. If my starting is a positive number no matter what number it is, I still want to store it in the first occurrence.  </p>
  
  <p>For example, if <code>start= -5</code>, I would like to store this calculated value in Y &lt;= m*i + b in <code>Trend.Line[1]</code>, the <code>-4</code> calculated value to <code>Trend.Line[2]</code>. Now if <code>start = 6</code>, I would like to store calculated value in <code>Trend.Line[1]</code>, the <code>7</code> calculated value to <code>Trend.Line[2]</code></p>
  
  <p>Thanks for looking into this.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>  Trend.Line &lt;- numeric(0)
  
    start &lt;- -5 
    end &lt;- 12 
  
    m &lt;- 345.72
    b &lt;- 54454 
  
    for(i in start:end){
       y &lt;- m*(i) + b 
      Trend.Line[i] &lt;- y
    }  
  
    Trend.Line
  </code></pre>