# Compounded addition`%+%` <- function(x, y) { eval.parent(substitute(x <- x + y))} # Compounded subtraction`%-%` <- function(x, y) { eval.parent(substitute(x <- x - y))} # Test in a loopx <- 10y <- 10for (i in 1:10){ x %+% i y %-% i}xy
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.