class Array
Since more than one language is used for Array
transfert This stuff is moved from R4rb package to here
> Undone because R4rb is not self-content¶ ↑
> methods :> and :< overloaded from R4rb¶ ↑
Public Instance Methods
<(out)
click to toggle source
# File lib/dyndoc/common/dynArray.rb, line 49 def <(out) #out represents here an R or Julia expression to execute and put inside the Array out.strip! mode=:r #out represents here an R or Julia object if out =~ /^jl\:/ mode,out=:jl,out[3..-1] elsif out =~ /^(r|R)\:/ out=out[2..-1] end case mode when :r self.rb2R=nil unless @rb2R @rb2R << out @rb2R > self when :jl self.rb2jl! unless @rb2jl @rb2jl << out @rb2jl > self end return self end
>(out)
click to toggle source
out is a String
representing a R or Julia expression
# File lib/dyndoc/common/dynArray.rb, line 27 def >(out) out.strip! mode=:r #out represents here an R or Julia object if out =~ /^jl\:/ mode,out=:jl,out[3..-1] elsif out =~ /^(r|R)\:/ out=out[2..-1] end case mode when :r self.rb2R=nil unless @rb2R @rb2R << out @rb2R < self when :jl self.rb2jl=nil unless @rb2jl @rb2jl << out @rb2jl < self end return self end
rb2jl!()
click to toggle source
Already in R4rb and still there to be self-contents
def rb2R=(mode=nil)
##puts "rb2R mode #{object_id}";p mode mode=R4rb unless mode return if @rb2R_mode and @rb2R_mode==mode @rb2R_mode=mode unless @rb2R_mode @rb2R=(@rb2R_mode==Rserve ? Rserve::RVector.new("") : R2rb::RVector.new("") ) ##puts "rb2R=";p @rb2R
end
# File lib/dyndoc/common/dynArray.rb, line 21 def rb2jl! #only one mode @rb2jl= Julia::Vector.new("") ##puts "rb2jl=";p @rb2jl end