C and VB.NET (and perhaps some others) have convenient functions for incrementing a variable. E.g.:
x = 3
x +=5
# x now equals 8
Is there a way to define such an operator in R? I've tried:
`+=` <- function(x, y){x <<- x + y}
but no joy. That was based on the answer to this question.