title: If statement with multiple actions in R
body: <p>I would like to write an if statement of the following form:</p>
  
  <pre><code>a=5
  b=2
  
  la&lt;-function(a,b){
  if(a&gt;3){a}
  else{b}
  }
  </code></pre>
  
  <p>Now what I would like to do is not only have one action in the if statement but two, for example:</p>
  
  <pre><code>if(a&gt;3){a and c&lt;&lt;-1000}
  </code></pre>
  
  <p>In this case to return 'a' and also write 1000 in variable 'c'</p>
  
  <p>My question is how to put in multiple actions after the if statement.</p>