title: Ifelse multiple conditions
body: <p>I'm new in R so don't be hard on me, I'm trying to make a loop with ifelse in R, I have the next code:</p>
  
  <pre><code>    x1=c(9.9,10.1,10.28,10.47,10.66,10.9,11.1,11.3,11.5)
  
      new1 = ((0.8822*x1)- 9.6887)
  
      x2=c(9.9,10.1,10.28,10.47,10.66,10.9,11.1,11.3,11.5)
  
      new2 = ((0.8822*x2)- 10.2887)
  
      cdata = mydata
  
      cd1= ifelse(new2 &lt;= cdata &lt;= new1,1.5,2)
  
      Error: unexpected '&lt;=' in "cd1= ifelse(new2 &lt;= cdata &lt;="
  </code></pre>
  
  <p>And I don't know if there's another option to make it work</p>