IFELSE function XXXX
William Dunlap <wdunlap <at> tibco.com> writes:
Avoid assignments in arguments to function calls, especially multiple assignments to the same object, except when you know what you are doing and want to write obscure code. Change the above line to data3$input1 <- ifelse(data3$res1==1, data3$input1+10, data3input1)
data3 <- transform(data3,input1=ifelse(res==1,input1+10,input1)) might be even clearer