class R::List
Public Instance Methods
+(other_object)
click to toggle source
# File lib/R_interface/rlist.rb, line 37 def +(other_object) R::Support.exec_function_name("`+`", @r_interop, other_object.r_interop) end
>>(index)
click to toggle source
# File lib/R_interface/rlist.rb, line 57 def >>(index) raise IndexError.new("index #{index} out of list bounds: 0...#{index - 1}") if (index > (length - 1) >> 0) raise ArgumentError.new("Indexed element is not a vector") if !self[[index + 1]].is_a? R::Vector return nil if (self[[index + 1]].is__null >> 0) self[[index + 1]] >> 0 end
each() { |self[[i]]| ... }
click to toggle source
# File lib/R_interface/rlist.rb, line 71 def each # length is a R::Vector, in order to extract its size as a Ruby number we need to # use the >> operator (1..length >> 0).each do |i| yield self[[i]] end end
each_with_index() { |self[[i]], i| ... }
click to toggle source
# File lib/R_interface/rlist.rb, line 85 def each_with_index (1..length >> 0).each do |i| yield self[[i]], i end end
method_missing_assign(elmt_name, arg)
click to toggle source
# File lib/R_interface/rlist.rb, line 45 def method_missing_assign(elmt_name, arg) setR_name("`[[<-`", elmt_name, arg) end