Module: R::BinaryOperators

Included in:
Language, Matrix, RSymbol, Vector, Symbol
Defined in:
lib/R_interface/rbinary_operators.rb

Overview


Note that binary operators work on vectors and matrices as well as scalars.


Instance Method Summary collapse

Instance Method Details

#!=(other_object) ⇒ Object Also known as: ne





182
183
184
# File 'lib/R_interface/rbinary_operators.rb', line 182

def !=(other_object)
  exec_bin_oper("`!=`", other_object)
end

#%(other_object) ⇒ Object Also known as: mod





116
117
118
# File 'lib/R_interface/rbinary_operators.rb', line 116

def %(other_object)
  exec_bin_oper("`%%`", other_object)
end

#*(other_object) ⇒ Object





92
93
94
# File 'lib/R_interface/rbinary_operators.rb', line 92

def *(other_object)
  exec_bin_oper("`*`", other_object)
end

#**(other_object) ⇒ Object





108
109
110
# File 'lib/R_interface/rbinary_operators.rb', line 108

def **(other_object)
  exec_bin_oper("`^`", other_object)
end

#+(other_object) ⇒ Object



Parameters:

  • other_object


76
77
78
# File 'lib/R_interface/rbinary_operators.rb', line 76

def +(other_object)
  exec_bin_oper("`+`", other_object)
end

#-(other_object) ⇒ Object





84
85
86
# File 'lib/R_interface/rbinary_operators.rb', line 84

def -(other_object)
  exec_bin_oper("`-`", other_object)
end

#/(other_object) ⇒ Object





100
101
102
# File 'lib/R_interface/rbinary_operators.rb', line 100

def /(other_object)
  exec_bin_oper("`/`", other_object)
end

#<(other_object) ⇒ Object Also known as: lt





142
143
144
# File 'lib/R_interface/rbinary_operators.rb', line 142

def <(other_object)
  exec_bin_oper("`<`", other_object)
end

#<=(other_object) ⇒ Object Also known as: le





152
153
154
# File 'lib/R_interface/rbinary_operators.rb', line 152

def <=(other_object)
  exec_bin_oper("`<=`", other_object)
end

#>(other_object) ⇒ Object Also known as: gt





162
163
164
# File 'lib/R_interface/rbinary_operators.rb', line 162

def >(other_object)
  exec_bin_oper("`>`", other_object)
end

#>=(other_object) ⇒ Object Also known as: ge





172
173
174
# File 'lib/R_interface/rbinary_operators.rb', line 172

def >=(other_object)
  exec_bin_oper("`>=`", other_object)
end

#eq(other_object) ⇒ Object





134
135
136
# File 'lib/R_interface/rbinary_operators.rb', line 134

def eq(other_object)
  exec_bin_oper("`==`", other_object)
end

#int_div(other_object) ⇒ Object





126
127
128
# File 'lib/R_interface/rbinary_operators.rb', line 126

def int_div(other_object)
  exec_bin_oper("`%/%`", other_object)
end

#til(other_object) ⇒ Object





192
193
194
195
196
# File 'lib/R_interface/rbinary_operators.rb', line 192

def til(other_object)
  return R::Support.exec_function_name("`~`", other_object) if
    ((self.is_a? Symbol) && (self == :all))
  exec_bin_oper("`~`", other_object)
end