C and VB.NET (and possibly some others) have convenient functions for incrementing a variable. For instance:.
x = 3 x +=5
Is there any way to define such an operator in R? I tried:
`+=` <- function(x, y){x <<- x + y}
but not joy. This was based on the answer to this question .
source share