In Python you can do this:
>>> x = 1
>>> x += 1
>>> print(x)
2
Is this possible in R? I can't find it on the Internet and the Python operator does not work in R (4.2.0):
> x <- 1
> x += 1
Error: unexpected '=' in "x +="
> x +<- 1
Error: unexpected assignment in "x +<-"