title: + signs appearing in console in R
body: <p>I´m  quite new at programming, and I started with R. I wanted to make a script which takes as input a matrix with the columns: time, x, y (coordenates) and then divide the time spent in each quadrant of a circular area. I have a roughly done script, but for any reason I don´t understand, when I execute the for loop in the editor, it appears all the letters red in the console with a "+" at the beginning of each line, which doesn´t let me open any other object any more when I call it.</p>
  
  <pre><code>set.seed(20)
  x = matrix(rnorm(10,3,4),10,1)
  y = matrix (rnorm(10,3,4),10,1)
  time = matrix (1:10,10,1)
  a = cbind (time,x,y)
  colnames(a) = c("time","x","y")
  
  
    upperright =  a[,2] &gt; 0 &amp;&amp; a[,3] &gt; 0 
    upperleft =   a[,2] &lt; 0 &amp;&amp; a[,3] &gt; 0
    lowerright =  a[,2] &gt; 0 &amp;&amp; a[,3] &lt; 0
    lowerleft =   a[,2] &lt; 0 &amp;&amp; a[,3] &lt; 0
  
  calculation &lt;- function () {
      upperrightquadrant = 0
      upperleftquadrant = 0
      lowerrightquadrant = 0
      lowerleftquadrant = 0
  for (i in c(1:nrow(a))){
      if (upperright) upperrightquadrant &lt;&lt;- sum((a[i,1]-a[i-1,1]))
      if (upperleft)upperleftquadrant &lt;&lt;- sum((a[i,1]-a[i-1,1]))
      if (lowerright) lowerrightquadrant &lt;&lt;-sum((a[i,1]-a[i-1,1]))
      if (lowerleft) lowerleftquadrant &lt;&lt;- sum((a[i,1]-a[i-1,1]))
  }}
  output = lapply (a, calculation)
  </code></pre>