Class: Rri::RConverters::FloatConverter
- Inherits:
-
Object
- Object
- Rri::RConverters::FloatConverter
- Defined in:
- lib/rri/r_converters/float_converter.rb
Overview
Converter for ruby Floats
Convert ruby Floats to double in R
Instance Method Summary collapse
-
#convert(obj) ⇒ Array
Convert ruby object to R format.
Instance Method Details
#convert(obj) ⇒ Array
Convert ruby object to R format
If the ruby object is a Float, converts it into an R double
18 19 20 21 22 23 24 |
# File 'lib/rri/r_converters/float_converter.rb', line 18 def convert(obj) if obj.kind_of? Float [true, REXPDouble.new(obj)] else [false, nil] end end |