Ops.struct_list: Binary operations

Ops.struct_listR Documentation

Binary operations

Description

Binary operations

Usage

## S3 method for class 'struct_list'
Ops(e1, e2)

Examples


as.double.test = function(x) {
  return(x$a)
}

`+.test` = function(e1,e2) {
  e1$a = e1$a + as.numeric(e2)
  return(e1)
}

x = struct(a=1,b=2,c=1:3,.class="test")

# TODO: needs debugging
# x+3
# x[[1]]+3
# rep(x,5)+1:5
# x[[1]]+x[[1]]


terminological/ggrrr documentation built on June 15, 2024, 6:35 a.m.