Class: Rserve::RVector
- Inherits:
-
R2rb::RVector
- Object
- R2rb::RVector
- Rserve::RVector
- Defined in:
- lib/R4rb/Rserve.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
Returns the value of attribute cli.
Attributes inherited from R2rb::RVector
Class Method Summary collapse
Instance Method Summary collapse
-
#<(ary) ⇒ Object
(also: #value=)
no need to make aby change for “>”.
- #<<(name) ⇒ Object
-
#initialize(name, cli = nil) ⇒ RVector
constructor
The goal is to connect a ruby Array to a Rserve Vector.
-
#name! ⇒ Object
name from cli and name_orig.
- #set_with_arg(ary) ⇒ Object (also: #value_with_arg=)
Methods inherited from R2rb::RVector
#>, #[], #arg=, #get, #get_with_arg, #length, #set, #set_arg, #valid?
Constructor Details
#initialize(name, cli = nil) ⇒ RVector
The goal is to connect a ruby Array to a Rserve Vector
168 169 170 171 172 173 174 |
# File 'lib/R4rb/Rserve.rb', line 168 def initialize(name,cli=nil) @cli=(cli ? cli : Rserve.cli) puts "WARNING: Rserve::RVector.initialize: @cli is null!" unless @cli @name_orig=name super(name!) @type="expr" end |
Instance Attribute Details
#cli ⇒ Object
Returns the value of attribute cli.
165 166 167 |
# File 'lib/R4rb/Rserve.rb', line 165 def cli @cli end |
Class Method Details
Instance Method Details
#<(ary) ⇒ Object Also known as: value=
no need to make aby change for “>”
191 192 193 194 |
# File 'lib/R4rb/Rserve.rb', line 191 def <(ary) ary.R2rb(".rubyExport") #transition Rserve.assign(".rubyExport",@name_orig,@cli) end |
#<<(name) ⇒ Object
182 183 184 185 186 187 |
# File 'lib/R4rb/Rserve.rb', line 182 def <<(name) ## no "var" in this context! transform it in String if necessary @name_orig=name.to_s super(name!) return self end |
#name! ⇒ Object
name from cli and name_orig
176 177 178 179 180 |
# File 'lib/R4rb/Rserve.rb', line 176 def name! #name from cli and name_orig ##puts "name!";p @name_orig ##deb,fin="quote(",")" #(@name_orig=~/^evalq\(/ ? ["quote(",")"] : ["\"","\""]) "RSeval(#{@cli},quote(#{@name_orig}))" end |