I would like to write an if statement like this:
a=5 b=2 la<-function(a,b){ if(a>3){a} else{b} }
Now what I would like to do is not only one action in the if statement, but two, for example:
if(a>3){a and c<<-1000}
In this case, to return 'a', as well as writing 1000 to the variable 'c'
My question is how to add a few actions after the if statement.
r
user1723765
source share