module R::IndexedObject

Public Instance Methods

[](index) click to toggle source
# File lib/R_interface/rindexed_object.rb, line 36
def [](index)

  # dealing with double indexing function '[['
  if (index.is_a? Array)
    R::Support.exec_function(R::Support.dbk_index, @r_interop, *index)
  else
    R::Support.exec_function_name("`[`", @r_interop, index)
  end
end
[]=(index, values) click to toggle source
# File lib/R_interface/rindexed_object.rb, line 54
def []=(index, values)

  # dealing with double indexing function '[['
  if (index.is_a? Array)
    setR_name("`[[<-`", *index, values)
  else
    setR_name("`[<-`", index, values)
  end
  
  self
  
end
size() click to toggle source
# File lib/R_interface/rindexed_object.rb, line 71
def size
  length >> 0
end