R/plusEqual.R

`%+=%` <- function(object, value ){
  UseMethod( "%+=%" )
}

`%+=%.default` <- function( object, value ){
  ob <- deparse(substitute(object) )
  val <- deparse( substitute( value ) )
  command <- paste( ob, "<-", ob, "+", val )
  invisible( eval( parse( text = command ), env = parent.frame(1) ) )
}

Try the operators package in your browser

Any scripts or data that you put into this service are public.

operators documentation built on May 2, 2019, 6:48 p.m.