title: Multiple variable assignments in ifelse()
body: <p>What mistake I am making here? I am trying to assign <code>a</code> and <code>b</code> some value if either three of the statements are true. I am trying to use the <code>ifelse</code> statement:</p>
  
  <pre><code>ifelse(1==1||2==2||3==3, (a&lt;-100,b&lt;-100), (a&lt;-1000,b&lt;-1000)) 
  </code></pre>
  
  <p>But I get an error: </p>
  
  <blockquote>
    <p>Error: unexpected ',' in " ifelse(1==1||2==2||3==3,(a&lt;-100,"</p>
  </blockquote>
  
  <p>Edited:</p>
  
  <p>In a more genraralized manner, there are two variables a and b that need to assigned different values depending on the conditions :if (x=="cat" or x=="dog" or x=="horse", then, a is 100 and b is 200, else, a is 500 and b is 1000) </p>